blob_id
stringlengths
40
40
language
stringclasses
1 value
repo_name
stringlengths
5
132
path
stringlengths
3
236
src_encoding
stringclasses
29 values
length_bytes
int64
8
7.94M
score
float64
2.52
5.72
int_score
int64
3
5
detected_licenses
listlengths
0
142
license_type
stringclasses
2 values
text
stringlengths
8
7.94M
download_success
bool
1 class
f6218fd149114dad40eef3b248a62021f8fd2bbd
JavaScript
hongjisung/DataStructure
/src/containers/deque.js
UTF-8
4,093
3.765625
4
[ "MIT" ]
permissive
/* Extends queue and add necessary methods class: deque Extends: queue method: // super ///private _sizeup ///public front back empty size clear // modifier pushBack pushFront popBack PopFront // overriding push -> private pop -> private compare // toStri...
true
2202d68cc763de0ec2cdb3ef7e1e748ebddcd43a
JavaScript
gregorylull/chatterbox-server
/client/scripts/app.js
UTF-8
4,592
2.640625
3
[]
no_license
// YOUR CODE HERE: $(document).ready(function () { var msgObj = {}; var myName = window.location.search.substring(10); var myRoom = "4chan"; var lastMessageTime = (new Date(0)).toJSON(); var rooms = {}; var friends = {}; var banned = {}; var serverURL = 'http://127.0.0.1'; var serverPORT = ':3000'; ...
true
f2bac359c89e90ce369b0e638cedf85c33262c5b
JavaScript
matt5346/codeWars
/7kyuKatas/twoToOne/script.js
UTF-8
562
3.96875
4
[]
no_license
// 7 kyu two to One // Take 2 strings s1 and s2 including only letters from ato z. // Return a new sorted string, the longest possible, // containing distinct letters, // // each taken only once - coming from s1 or s2. // Examples: // a = "xyaabbbccccdefww" // b = "xxxxyyyyabklmopq" // longest(a, b) -> "abcdefklmopqwxy...
true
a4b28ec312fa311484c163ca20fc4acf23934b71
JavaScript
fengmk2/ask
/public/js/lang.js
UTF-8
1,895
3.15625
3
[]
no_license
// format datetime, demo: new Date().format("yyyy-MM-dd hh:mm:ss"); Date.prototype.format = function(format) { format = format || "yyyy-MM-dd hh:mm:ss"; var o = { "M+" : this.getMonth()+1, //month "d+" : this.getDate(), //day "h+" : this.getHours(), //hour "m+" : this.getMinutes(), //minute "s+" : thi...
true
4e34da326ed77551a265c4e778f79d9c94fdbc38
JavaScript
ariefdfaltah/currency-changer
/src/containers/select_bar.js
UTF-8
1,569
2.515625
3
[]
no_license
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { fetchCurrency, fetchNullCurrency } from '../actions/index' import ArrayRange from 'array-range'; import './select_bar.css'; class SelectBar extends Component{ constructor(props) { ...
true
e58597664a76bd39f57d3fe36142b9bd3e6e3a28
JavaScript
SUHYUNSHIM/WebServer
/WebPage2/WebContent/step4/event.js
UTF-8
1,384
3.28125
3
[]
no_license
//<body onload="kaja();"> //웹페이지가 로딩될 때.. 이러면 여기에 html이 들어감. 역할을 분리하는 mvc 모델에 어긋난다. window.onload = function(){ //객체.속성 = 값 --> 객체.이벤트 = 이벤트처리함수. 웹페이지가 로딩될 때 해당 함수가 수행된다. //tag 사용 없이 load var kong = document.getElementById('kong'); //아이디 id="kong"인 버튼에 접근을 한다.(찾아가보니 그렇다.) //객체를 만들었다. if(kong!=null){ //객체가 만들어졌으면-> ...
true
ebcdb1bf84ed3764089416908db7f00c1be812bb
JavaScript
Cevantime/sharesources
/assets_src/js/src/fullscreen.js
UTF-8
824
2.515625
3
[]
no_license
window.document.exitFullscreen = window.document.exitFullscreen || function () { if (window.document.webkitExitFullscreen) { window.document.webkitExitFullscreen(); } else if (window.document.mozCancelFullScreen) { window.document.mozCancelFullScreen(); } else if (window.document.msExitFulls...
true
74059edf133ddc0461b34e953e90ee39d42c4e5c
JavaScript
AlenaKhmyz/frontend-course
/react/react-redux-social/src/actions/AuthActions.js
UTF-8
5,394
2.8125
3
[ "MIT" ]
permissive
import axios from 'axios'; import { ACTION_TYPES } from '../const'; /** * 1) action creator для экшена изменения пароля. Action - это объект, а * ActionCreator - это функция которая возвращает Action. Преимущество функции в том, * что есть возможность подкинуть переменную в payload. Поэтому чаще всего используются...
true
f8f790e59fdec6a2acb3a977dc51a1437f77e738
JavaScript
ohoktnt/speer-assessment
/test/registrationTest.js
UTF-8
2,571
2.515625
3
[]
no_license
const chai = require('chai'); const chaiHttp = require('chai-http'); const server = require('../server'); const { expect } = chai; chai.use(chaiHttp); describe('Testing Registration', () => { it('should return all users on /users GET', function(done) { chai.request('http://localhost:8003') .get('/users'...
true
5475881fb57d2b37e228f651ea628369edcbe56f
JavaScript
yaowuya/webstudy
/test/test4.js
UTF-8
182
2.96875
3
[]
no_license
var b={ "a":[] } b.a=[{"bb":1},{"bb":2}] function f(item) { item.forEach(function (value) { value["bb"]="a" }) console.log(item); } f(b.a) console.log(b.a);
true
0af371ce21731ee77b9c43cc88a39bf65eee0127
JavaScript
vukiman1/Javascript-Home-Work-lean-from-CoderX
/bai 33/bai3.js
UTF-8
218
3.234375
3
[]
no_license
/** * Viết hàm xếp hạng điểm số theo công thức sau: * [0-5): C * [5-7): B * [7-10]: A */ function grade(score) { if (score < 5) return 'C'; else if ( score >= 7 ) return 'A'; else return 'B'; }
true
78718124978a04f2fd876a9cf7a265cc091ef55a
JavaScript
hariprohandler/node-sequalize-best-practices
/src/controller/articles.js
UTF-8
927
2.578125
3
[]
no_license
const { Article, Users } = require('../models/db') async function createArticle (title, content, authorId) { if( typeof title !== 'string' || title.length < 1){ throw new Error('Title is empty or undefined') } if( typeof content !== 'string' || content.length < 1){ throw new Error('Content...
true
3efb8127cdd8b3d86b4f5683c41273f7c64bd813
JavaScript
Safia54/becode-presences-mvp
/assets/js/app-index.js
UTF-8
1,190
2.640625
3
[ "MIT" ]
permissive
function getCookie(cname) { var name = cname + "="; var decodedCookie = decodeURIComponent(document.cookie); var ca = decodedCookie.split(';'); for(var i = 0; i <ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') { c = c.substring(1); } if (c.indexOf(...
true
462da028005b4db13ba8c1df3d8e9a49d234bcc6
JavaScript
YoussefBouhlal/ucef-woo
/assets/src/js/components/Comments.js
UTF-8
2,113
3
3
[]
no_license
class Comments { constructor() { this.form = document.querySelector( '#commentform' ); this.text = document.querySelector( '#comment' ); this.author = document.querySelector( '#author' ); this.email = document.querySelector( '#email' ); if ( this.form ) ...
true
4fc49be47954c7e635412a95cce3ffe3e69adada
JavaScript
jasscia/leetcode
/heap.js
UTF-8
1,789
3.59375
4
[]
no_license
class Heap{ constructor(arr){ this.heapify(arr||[]) } heapify(arr){ this.heap=[] arr.forEach(value=>{ this.insert(value) }) } insert (value){ this.heap.push(value) this.shiftUp(this.size()-1) } remove (){ const top = this.heap[0] this.heap[0] = this.heap.pop() thi...
true
700f74d5e9636dae443fc3bfb0c567e6abed40d8
JavaScript
egingis/crystal-collector-game
/assets/javascript/game.js
UTF-8
2,214
3.5625
4
[]
no_license
//base game variables var Wins = 0; var Losses = 0; var addition = 0; var computerscore = Math.floor((Math.random() * 100) + 19); //variable for random value given to each gem var pink = Math.floor((Math.random() * 12) + 1); var silver = Math.floor((Math.random() * 12) + 1); var green = Math.floor((Math.rando...
true
9a2b965ffed9298d81c91311ea752152c93b6d7a
JavaScript
MattDesmet/algorithms
/01_fundamentals/Basic_13/11_max_min_average.js
UTF-8
555
4.4375
4
[]
no_license
// given an array, print the max, min and average values for that array. var array = [1,3,6,10,99,86,87,1001] var min = array[0]; var max = array[0]; var sum = 0; for (var i = 0; i < array.length; i++) { sum = sum += array[i]; if (array[i] < min){ min = array[i]; } if (array[i] > max) { max = array...
true
d1d73d45611e9874df13d9cda4165e3ddd49b273
JavaScript
medric/jolly-landing-page
/app/services/Overflow.js
UTF-8
2,471
2.65625
3
[]
no_license
var redis = require('redis'); var client = redis.createClient(); //redis cli instance const PREFIX = 'secure:'; const SUFFIX = ':ban'; const DEFAULT_TIME = 10 * 60; const DEFAULT_BAN_TIME = 60 * 60; /** * Handles overflowed requests on a specific route * @param {map} _opti...
true
09a21558e352a32d7fe510eaf2b1a690d53dbd48
JavaScript
bgoonz/UsefulResourceRepo2.0
/MY_REPOS/INTERVIEW-PREP-COMPLETE/Leetcode/162-find-peak-element.js
UTF-8
427
3.421875
3
[ "MIT" ]
permissive
/** * @param {number[]} nums * @return {number} */ const findPeakElement = function (nums) { if (nums == null) return -1; const len = nums.length; if (len === 1) return 0; for (let i = 1; i < len; i++) { if (i === 1 && nums[i] < nums[i - 1]) return 0; else if (i === len - 1 && nums[i] > nums[i - 1]) ...
true
b057bf47eb00e2c84c1c2e832646c31f0481cb41
JavaScript
2576059620/sevenGroups
/project/js/购艺术.js
UTF-8
6,005
2.6875
3
[ "MIT" ]
permissive
//选择点击 $(document).ready(function(){ function clickMenu (menus, menuClassName) { menus.on('click', function(){ $.each(menus, function () { $(this).removeClass(menuClassName); }) $(this).addClass(menuClassName); }) } var $mainMenuSpan = $(".select button"); clickMenu($mainMenuSpan,'botto...
true
50bc526a4d3b119349992bbff01dd5006f25ebe3
JavaScript
nss-evening-cohort-16/hip-hop-pizza-and-wangs-dark-star-coders
/src/scripts/components/viewItem.js
UTF-8
1,320
2.71875
3
[]
no_license
import clearDom from '../helpers/data/clearDom'; const viewItem = (obj) => { clearDom(); document.querySelector('#view').innerHTML += ` <div class="mt-5 d-flex flex-wrap"> <div class="d-flex flex-column"> <div class="mt-5"> <i id="edit-order-btn--${obj.firebaseKey}" class="fas fa-...
true
d1991c29767d82c934d4b583c455e8b1eb45b461
JavaScript
lsr-explore/node-school-exercises
/lololodash/6-count-the-comments.js
UTF-8
460
2.625
3
[ "MIT" ]
permissive
// include the Lo-Dash library var _ = require("lodash"); var worker = function(comments) { var results = [] var groupedComments = _.groupBy(comments, 'username'); _.forEach(groupedComments, function(commentSet, index) { results.push({'username' : index, 'comment_count' : _.size(commentSet)}) ...
true
3b8eafd00977163edf8d61c8fa474dc9339dadc2
JavaScript
SamHDevv/JavaScript-Excercises
/exercises/24-Bottles-of-milk/app.js
UTF-8
776
3.953125
4
[]
no_license
// Your code here: var bottles = 0; for (bottles = 99; bottles > 0; bottles--) { //console.log(bottles); var decreaseBottles = bottles-1; var end = "No more bottles of milk on the wall, no more bottles of milk. Go to the store and buy some more, 99 bottles of milk on the wall."; if (bo...
true
d3151a1abc695b565cbf48482a247fcf2b134259
JavaScript
sinaamini92/react-social-network
/app/reducers/voteReducer.jsx
UTF-8
1,485
2.65625
3
[ "MIT" ]
permissive
// - Import react components import moment from 'moment' import _ from 'lodash' // - Import action types import * as types from 'actionTypes' /** * Default state */ var defaultState = { postVotes: {}, loaded:false } /** * Vote actions * @param {object} state * @param {object} action */ export var vo...
true
7cbb7fb7eb659013ff823572a2488f2444668b62
JavaScript
lvsdian/nodejs
/node/src/app1/module/http/app1.js
UTF-8
735
2.9375
3
[]
no_license
// 服务端 const http = require('http'); const server = http.createServer(function(request, response){ response.writeHead(200, {'Content-Type': 'text/plain'}); response.end('Hello Node'); }); server.listen(2000, 'localhost'); // 服务器正常启动并且处于监听模式下就会触发 server.on('listening', function () { console.log("server is listenin...
true
f796a3afa998e1d419154def704911e2f7a1412a
JavaScript
leifarriens/currencyfy
/index.js
UTF-8
1,693
2.609375
3
[ "MIT" ]
permissive
"use strict"; var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; ...
true
8eca3674d62a509de0efe87fdd986c8758de31a7
JavaScript
Moskari/Kamula
/test/function_tests.js
UTF-8
914
2.546875
3
[]
no_license
var assert = require("assert") var funcs = require('../functions') describe('Functions', function(){ describe('#check_string_length()', function(){ it('should return false when the value length is not between 1 and 30', function(){ assert.equal(false, funcs.check_string_length("", 30), 'should be false'); ...
true
531fe7b3c9036812f019ba49b2cd7492862d24d2
JavaScript
FoxComm/api-js
/src/api/credit-cards.js
UTF-8
3,996
2.765625
3
[]
no_license
// @class CreditCards // Accessible via [creditCards](#foxapi-creditcards) property of [FoxApi](#foxapi) instance. import * as endpoints from '../endpoints'; function creditCardForStripePayload(creditCard, billingAddress) { return { name: creditCard.holderName, number: creditCard.number, cvc: creditCard...
true
03450f27056c7aa8a27a9ab50506d5383a797c30
JavaScript
chrisbloecker/tsm-oauth-js-solution
/app.js
UTF-8
2,565
2.796875
3
[ "MIT" ]
permissive
// in this mini app, we're implementing OAuth authentication with github and follow // the workflow described here: https://docs.github.com/en/developers/apps/authorizing-oauth-apps // we use the express web framework, see here for a quickstart guide: const express = require("express") const app = express() const...
true
e998a305e280719feb1a9a95dc2ce7c4c7f1cc9c
JavaScript
KudriPro/1sedona_adaptive
/source/js/hotels.js
UTF-8
5,307
2.90625
3
[]
no_license
window.addEventListener('load', function () { const sortHotels = () => { //Сортировка отелей по цене const sotrPriceBtn = document.querySelector(".selection-results__byprice"); const selectionAscending = document.querySelector(".selection-results__ascending"); const selectiondDscending = document.que...
true
67b7385c3d6dcdf5eedc5e5e534e5f25bfb56fa1
JavaScript
atomikolex/basic-web-components
/packages/basic-component-mixins/src/DirectionSelection.js
UTF-8
1,587
2.96875
3
[ "MIT" ]
permissive
/* Exported function extends a base class with DirectionSelection. */ export default (base) => { /** * Mixin which maps direction semantics (goLeft, goRight, etc.) to selection * semantics (selectPrevious, selectNext, etc.). * * This mixin can be used in conjunction with the * [KeyboardDirection](Keyb...
true
252a1d543de1932c2ff3b115f3cb868877cf3a1e
JavaScript
abaksdndsafm/Catching-Sun-1
/script.js
UTF-8
10,571
3.078125
3
[]
no_license
//canvas let canvas = document.getElementById('mycanv'); let ctx = canvas.getContext('2d'); canvas.style.border = 'none'; //wireframes/different screens let avatpage = document.getElementById('avatPage'); let endpage = document.getElementById('endPage'); //buttons let startBtn = document.querySelector('#start') l...
true
236df1a550938a3f7713108d9c2fdc31a2c6c756
JavaScript
Gollwyd/basic-js
/src/count-cats.js
UTF-8
201
2.90625
3
[ "MIT" ]
permissive
module.exports = function countCats(arr) { let number = 0; arr.forEach(item => { for (let k=0; k<item.length; k++) { if ( item[k]=='^^') number++; } }); return number; }
true
65948913314c9fd637e86013f44b89e85538b502
JavaScript
whenTheMorningDark/react_hook_admin
/src/utils/tree.js
UTF-8
842
2.796875
3
[]
no_license
export function findTreeNode(data,key="id",targetData){ let result = {} let stack = JSON.parse(JSON.stringify(data)) while(stack.length){ let node = stack.shift() if(node[key] === targetData){ result = node break } if(node.children && node.children.length>0){ stack = [...stack,.....
true
4069171ace32114a6dd672b6fa5f7dc7ebf3fbdd
JavaScript
rmartind/mystery-landing
/public/main.js
UTF-8
310
2.859375
3
[ "MIT" ]
permissive
var property = document.getElementById("instructions"); var download = document.getElementById("yes"); download.addEventListener("click", instruct); function instruct() { if (property.style.display == "block") { property.style.display = "none"; } else { property.style.display = "block"; } }
true
807ede06fd79227cb90a19cf71c07d984353b388
JavaScript
lilbitner/workoutapp_frontend
/login.js
UTF-8
1,380
2.890625
3
[]
no_license
const authUrl = "http://localhost:3000/login" const loginForm = document.querySelector('#login') loginForm.addEventListener('submit', () => { event.preventDefault() const formData = new FormData(loginForm) const username = formData.get('username') const password = formData.get('password') loginForm...
true
a092d19be83224fd2992ea293a123b3370d3e369
JavaScript
Boryszs/Aplikacje-Mobilne-Lab2
/app.js
UTF-8
1,932
3.09375
3
[]
no_license
const _=require('lodash'); const { sum, find } = require('lodash'); function avg(){ console.log("srednia:",_.mean(arguments)); } function min(){ console.log("min:",_.min(arguments)); } function max(){ console.log("max:",_.max(arguments)); } function userInfo(User){ var suma=0; var coun...
true
9272673e16588b84e8bb6c0417fd68b6df09dac6
JavaScript
michaelacook/interactive-form
/js/script.js
UTF-8
14,007
3.0625
3
[]
no_license
/* Full Stack JavaScript project 3: Interactive Form by Michael Cook I am aiming for "Exceeds Expectations". Please do not let it pass if it does not meet that standard. The real-time validation and messaging is applied to the name, email, and activities sections of the form. */ /*--------------------------------...
true
89a54385898e00defcdd23128879ce5f0f01e157
JavaScript
dougrosman/ccc-webdev1
/docs/sp20/in_class/day_07/scripts/form.js
UTF-8
515
3.453125
3
[]
no_license
let myString = ""; let submitButton = document.getElementById("submit-button"); let firstName = document.getElementById("fname"); let lastName = document.getElementById("lname"); let myPoem = document.getElementById("my-poem"); // submitButton.addEventListener('click', printName); submitButton.addEventListener('c...
true
6b3073b028e27faf5fc189e46d5abf08acf07557
JavaScript
amir5000/knockoutTutorial
/app.js
UTF-8
333
2.6875
3
[]
no_license
(function(){ var carMakerVM = function() { this.numberOfClicks = ko.observable(0); this.car = ko.observable(); this.array = ko.observableArray(); this.addCar = function () { this.array.push(this.car()); this.numberOfClicks(this.numberOfClicks() + 1); this.car(""); } }; ko.applyBindings(new carMake...
true
8c52f106f2ee8490bbf5c1d278dd331f866ca6e4
JavaScript
ETTTTT/merchant
/src/utils/lib.js
UTF-8
1,595
2.75
3
[]
no_license
import _ from 'lodash'; export const groupBy = (srcArray, iteratee) => { if (!_.isArray(srcArray)) { throw new Error('groupBy: must be array'); } if (srcArray.length === 0) { return [[]]; } if (iteratee === 0 || iteratee === 1) { throw new Error('iteratee must be a number ...
true
f8d994e1682e9d58fb6f91c7bc3efac25cf8c6db
JavaScript
Zach-Calhoun/OCO
/operations.js
UTF-8
2,803
2.703125
3
[]
no_license
function operationsFactory() { var ops = {}; ops.load = { token: 'L', code: 0, executor: null, args: 2, description: 'L A B - Loads address A with value B', }; ops.move = { token: 'M', code: 1, executor: null, args: 2, description: 'M A B - Loads adress A with value at adress B', }, ops.i...
true
3af92a2072f6d20aec7a4fbb4f59f570275f7951
JavaScript
kakorcal/christy-natsumi
/lib/scripts/site-toggleMiniHeader.js
UTF-8
327
2.734375
3
[]
no_license
function toggleMiniHeader() { var y = window.scrollY; var header = document.querySelector('.cn-header'); var headerHeight = header.offsetHeight; var el = document.querySelector('.cn-header--mini'); if (y > headerHeight) { el.classList.add('show'); } else { el.className = 'cn-header--mini'; } } toggleMiniHe...
true
bb577b13ebbbf957d446990512ba4e0d0a0164e7
JavaScript
CocktailPartayy/projectCocktail
/dev/scripts/Search.js
UTF-8
3,885
2.65625
3
[]
no_license
import React, { Fragment } from 'react'; import { BrowserRouter, Route, Switch, Link } from 'react-router-dom'; import axios from 'axios'; import DrinkList from './DrinkList' import {imgStyle} from './app' // renders inputs where user can search for ingredients or cocktail names export default class Search extends Rea...
true
f29c7ec75628e6970ee561a52fca22bf450f31ee
JavaScript
Raafat9966/classRoom-Exercises
/Javascript-exercises/functionSolution.js
UTF-8
13,348
3.96875
4
[]
no_license
// ! Functions // const power = (base, exponent) => { // let result = 1 // for (let index = 0; index < exponent; index++) { // result *= base // } // return result // } // console.log(power(3, 2)); // ! function scope // let number = 10 // const half = number => number/2; // console.log(half(num...
true
0114d0d1aab170731858357155f4f6549bb2afc5
JavaScript
waleedafifi-401-advanced-javascript/data-structures-and-algorithms
/__test__/fizz-buzz-tree.test.js
UTF-8
1,152
2.984375
3
[]
no_license
'use strict'; const fizzBuzzTree = require('../challenges/fizzBuzzTree/fizz-buzz-tree'); const Tree = require('../Data-Structures/tree/tree'); const Node = require('../Data-Structures/tree/node'); describe('fizz-buzz-tree challenge', () => { let tree = null; beforeAll(() => { let one = new Node(12); le...
true
7624f1c439eab4574e6aa453b59517501f244e64
JavaScript
chenjinwei113708/cocos-creator
/superBricksCrasher/superBricksCrasher_case1/assets/Script/Utils/utils.js
UTF-8
2,934
3.25
3
[]
no_license
// const Tools = { // 获取数据类型 function getType (obj) { let type = typeof obj; // 不等于object则表示为基础数据类型 if (type !== 'object') return type; // 用正则来截取其类型部分,且变成小写 return Object.prototype.toString.call(obj).replace(/^\[object (\S+)\]$/, $1).toLowerCase() } // 浅拷贝 function shallowClone (target) { if (typeof targe...
true
e9900bbdeea70a06759e91b6d3ee335861751b67
JavaScript
Mikkochu/FullstackOpen2019
/Osa2/puhelinluettelo/src/components/Numbers.js
UTF-8
762
2.828125
3
[]
no_license
import React from "react"; const Numbers = ({ persons, filterInput, handleRemovePerson }) => { //filtteröidään person-lista filtteröintikentän perusteella ja sitten renderöidään filtteröidyt näytölle // Buttoniin on kiinnitetty eventhandler joka poistaa kyseisen henkilon. Eventhandler ottaa parametriksi id:n, jote...
true
f719dbefb88c3821e8845f1a3d35f0947c808776
JavaScript
bvhung2709/demo
/BaiTapCuoiKhoa/assets/js/login.js
UTF-8
791
2.5625
3
[]
no_license
var input = $(".item-input"); $(".item-btn").click(function() { var email = "vanhai160197@gmail.com"; var pass = 123456789; input.each(function() { if ($(this).val().trim() == "") { $(this).parent().find(".msg_emailpass").addClass("msg_emailpass2"); $(this).css("border","1px solid red"); } e...
true
cf2072a2b3cde2ccf61c66a889f7988c2e885dbe
JavaScript
farxC/ExerciciosJS
/EX04.js
UTF-8
131
2.890625
3
[]
no_license
function baseExpoente(base,expoente){ console.log('Base elevada ao expoente:',Math.pow(base,expoente)) } baseExpoente(2,2)
true
d61f0588acb46170cd57b6a19374f38d31adba48
JavaScript
nichaos2/project-management
/src/main/resources/static/js/myChart.js
UTF-8
1,232
3.4375
3
[]
no_license
// get the data as a string var chartData = decodeHtml(chartData); // convert the string to a JSON object var chartJsonArray = JSON.parse(chartData); // console.log(chartJsonArray); // take the chartJson Array and populate new arrays with the data // this helps later so we do not write each data one by one var numeri...
true
0c96b2f9e76be96dd292f1e781f55eb8cc51987f
JavaScript
DavidJKTofan/Data-Visualization
/SVG/app.js
UTF-8
246
3.125
3
[ "LicenseRef-scancode-other-permissive" ]
permissive
// Find out the stroke-dasharray of each Letter // Go to INSPECT in HTML and see CONSOLE const logo = document.querySelectorAll("#logo path"); for(let i = 0; i < logo.length; i++){ console.log(`Letter ${i} is ${logo[i].getTotalLength()}`); }
true
346760d9d9c51b80df611efdeb99978558bb6428
JavaScript
roceys/voice-synthesizer
/test/test.js
UTF-8
310
2.515625
3
[ "MIT" ]
permissive
// test.js - 测试 'use strict'; const assert=require('assert'); const leftpad=require('../src/left-pad'); describe('测试left-pad', ()=>{ it('4位填充', ()=>{ assert.equal(leftpad('a', 4, 'b'), 'bbba'); }); it('10位填充',()=>{ assert.equal(leftpad('a', 10, 'b'), 'bbbbbbbbba'); }) });
true
f8e8274c11f75deaf46a3a16db37aaab190a774a
JavaScript
sgleal97/sa-practica3
/Restaurante/index.js
UTF-8
1,183
2.640625
3
[]
no_license
//'use strict'; const express = require('express'); const app = express(); const morgan = require('morgan'); const axios = require("axios"); var body_parser = require('body-parser').json(); // middlewares //app.use(morgan('dev')); app.get('/', function(req, res) { res.json({"Title:":"Restaurante"}); }); //Recibi...
true
fd24523129ee9b23ef90bf867b5b53137978298c
JavaScript
almarieSaayman/ladiesThatCode
/CV Series/4_JavaScript/JavaScript Part 2/demos/demo2_objects.js
UTF-8
462
3.765625
4
[]
no_license
//create a book object - use it to populate a paragraph on a webpage function showDetails() { let book = { title : "A book about me", pages : 350, isPublished : true, datePublished : new Date("2021-08-02") }; document.getElementById("details").innerHTML = "Titl...
true
e6b3cf3a5f0d3407aef29162224ec15b06c98226
JavaScript
whhjdi/douban-demo
/js/main.js
UTF-8
11,023
2.71875
3
[ "MIT" ]
permissive
/*获取数据*/ var getData = { init(index) { this.isLoading = false this.$next = $('.next') this.$search = $('.search') this.$loading = $('.loading') this.$welcome = $('.jumbotron') this.$itemContainer = $('.item-container') if (this.isLoading) return this.i...
true
7ab1c1d627878bf2249422da7384a913de023f60
JavaScript
darknautic/NodeJS.servers
/ossec-tickets/mysql-conection.js
UTF-8
2,383
2.625
3
[]
no_license
/* * $ env | grep node * NODE_PATH=/usr/lib/nodejs:/usr/lib/node_modules:/usr/share/javascript * $ sudo npm install node-mysql * $ cd /usr/lib/ * $ sudo npm install node-mysql * $ cd node_modules/ * * $ cd /home/s47id/nodeJS.servers * $ nodejs mysql-conection.js * * #######################################...
true
1371d8ba85c2f9a386831a8df3ee8065a23d006b
JavaScript
nens/threedi-frontend
/app/threedi-graph/threedi-windrose.js
UTF-8
2,418
2.546875
3
[ "MIT" ]
permissive
// create the directives as re-usable components angular.module("threedi-graph") .directive('threediWindrose', function($http) { var link = function(scope, element, attrs) { // parents scope, html element, attributes attached to element // we are changing wind_speed and wind_direction, then call save_wind...
true
b33aaf497aefe8d461d74bbb3e370f3073cd167f
JavaScript
MauroManfredelli/Processo-e-Sviluppo
/Assignment 3/Assignment3-MVC/WebContent/resources/js/index.js
UTF-8
3,120
2.703125
3
[]
no_license
$(document).ready(function() { // Selezione form e definizione dei metodi di validazione $("#signinForm").validate({ // Definiamo le nostre regole di validazione rules : { username : { required : true, minlength : 5, maxlength : ...
true
a70bfc97bb1c8a48b284581e04fbca7ad1411237
JavaScript
weishihuai/etaoyaoWap
/bdw/oldWap/statics/js/common.js
UTF-8
7,820
2.765625
3
[]
no_license
/** * 自定义弹出窗口 目的取代alert 该方法依赖bootstrap.js * 该提示做为指定控件的提示 使用时候需要注意窗口不在当前屏幕的情况 * @param widgetId html元素id值 * @param orientation 窗口的弹出方向 top、bottom、left、right * @param title 标题名称 给title传一个空字符串则不显示标题 * @param content 窗口展示的内容 可以添加html代码与样式 */ function popover(widgetId,orientation,title,content){ ...
true
8862dfc3333123eb385883c7017b7ce2569cd3d4
JavaScript
makenova/AdventOfCode
/day3/day3-1.js
UTF-8
398
2.609375
3
[]
no_license
var readinput = require('../readinput'); var santasLilHelper = require('./helper.js'); var santasLocation = {houses:{'0,0':1}, currentLocation:'0,0', visitedLocations: 1}; readinput(3).then((input) => { input.split('').forEach((direction) => { santasLilHelper.updateLocation(direction, santasLocation); }); c...
true
62e681cde219ed101f7ec850363c1687905df9eb
JavaScript
wescoleman/LearnWithWes
/public/sketches/physonics/sketch/sketch.js
UTF-8
1,470
2.890625
3
[]
no_license
var majScale; var particles; var oscils; function setup() { createCanvas(window.innerWidth, window.innerHeight); var startButton = document.getElementById('startBtn'); var stopButton = document.getElementById('stopBtn'); startButton.onclick = function() { loop(); draw(); } stopB...
true
41d43f4d3c4beba1776d0b662351217dd425ac6f
JavaScript
lomari4/DVI
/src/pausedgame.js
UTF-8
1,222
2.578125
3
[]
no_license
export default class PausedGame extends Phaser.Scene { constructor() { super({ key: 'PausedGame' }); this.heighttoPauseGame = 150; } init(dato) { //Level del argumento this.level = dato.level; this.escena = dato.escena; } create() { this.checkLevel(...
true
1038989dfdef5968fb0e149e780ff2a9485377ac
JavaScript
Argonaut-B04/SIRIO
/FrontEnd/src/Components/Form/Employee/EmployeeFormUbahPassword.jsx
UTF-8
7,172
2.515625
3
[]
no_license
import React from 'react'; import SirioForm from '../SirioForm'; import SirioButton from '../../Button/SirioButton'; import EmployeeService from '../../../Services/EmployeeService'; import { withRouter } from 'react-router-dom'; import SirioMessageButton from "../../Button/ActionButton/SirioMessageButton"; class Emplo...
true
7c1c16fdfd723d5b2cc7885955d4765eff4e82c2
JavaScript
quguoliang/dobux
/scripts/utils/logger.js
UTF-8
573
2.671875
3
[ "MIT" ]
permissive
const chalk = require('chalk') function info(message) { console.log(message) } function warn(message) { console.log(chalk.yellowBright(message)) } function error(message) { console.log(chalk.redBright(message)) } function success(message) { console.log(chalk.greenBright(message)) } function printErrorAndEx...
true
d3affabc3eff55ebc637209ba913c5d8f4e64193
JavaScript
alcaen/Phaser_Multiplayer_Game
/public/js/shoot.js
UTF-8
701
2.890625
3
[]
no_license
class Shoot extends Phaser.Physics.Arcade.Sprite { constructor(scene, x, y, angle) { // Super super(scene, x, y, "bullet"); // Render scene.add.existing(this); // Physics Rendering scene.physics.add.existing(this); // Set Angle this.setAngle(angle); ...
true
e1297c61e4eef485fd8fdf215e49d49610acfb89
JavaScript
KingOneYan/cherry-markdown
/src/core/hooks/CommentReference.js
UTF-8
3,240
2.53125
3
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference", "MIT", "Apache-2.0", "LicenseRef-scancode-public-domain" ]
permissive
/** * Copyright (C) 2021 THL A29 Limited, a Tencent company. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by...
true
5e1da2572a1c6a3fa972114388967115c5534dc3
JavaScript
kelbas/ParcelSandbox
/index.js
UTF-8
1,913
3.515625
4
[]
no_license
const container = document.getElementById('app') const todos = [ { name: 'come to school', completed: true, }, { name: 'learn javascript', completed: false, }, { name: 'learn debugger', completed: false, }, ] const todoInput = document.createEleme...
true
b941ff76004f3e40fb25645cd8a4029b4fa72390
JavaScript
ndourEdacy/mainDor
/defilement.js
UTF-8
465
2.703125
3
[]
no_license
(function(){ var count=1; var total=4; function slide(x){ var image=document.getElementById('logo'); var img=image.firstChild; count+=x; if(count>total){ count=1; } if(count<1){ count=total; ...
true
70ead3858de6e62480bc14cc7dd05612a34e3061
JavaScript
jaf7/learnyounode-practice
/filteredLS.js
UTF-8
762
2.984375
3
[]
no_license
var path = require('path'), fs = require('fs'), directory = process.argv[2], ext = '.' + process.argv[3]; fs.readdir( directory, function( err, list ) { if ( err ) return console.error( err ); for ( var i = 0; i < list.length; i++ ) { var file = list[i], fileType = path.extname( file ); ...
true
6ccc12840210761eefd881300b09ea6a17b2a099
JavaScript
waleking/react_hooks
/src/componets/ReducerTutorial.js
UTF-8
1,212
3.015625
3
[]
no_license
import React, { useState, useReducer } from "react"; export const ReducerTutorial0 = () => { const [count, setCount] = useState(0); const [showText, setShowText] = useState(true); return ( <div> <p>{count}</p> <button onClick={() => { setCount(count + 1); setShowText(...
true
bfed1b78461d9cc1369bad5a7a19fed437a8947b
JavaScript
starjardin/React-Country-Quiz
/components/Answers.js
UTF-8
2,027
2.6875
3
[]
no_license
import React, { useState, useContext, useRef } from 'react' import useAddSound from '../utility/useAddSound' import ButtonNext from "./ButtonNext" import propTypes from 'prop-types' import { CountriesContext } from '../context/countriesContext' export default function Answers({ sortedRandomNumber, randomNumber1 }) { ...
true
085893f242d3ef26921e373f7c8acc685c649928
JavaScript
Zaima21/c31-class-activity
/Bird.js
UTF-8
891
3.5625
4
[]
no_license
class Bird extends BaseClass { constructor(x,y){ super(x,y,50,50); this.image = loadImage("sprites/bird.png"); this.smokeimage = loadImage("sprites/smoke.png"); this.trajectory = [];//an empty, we will populate the birds position is released } //draw - every frame display() { //this.bo...
true
b2c76ae3762082c025fce23e804af17b0010fb4b
JavaScript
liblibal/lmoliver.github.io
/lang.js
UTF-8
2,398
2.578125
3
[]
no_license
{ const LANG_ZH='zh_CN'; const LANG_EN='en_US'; let language=LANG_ZH; const DICT_DATA={ [LANG_ZH]:{ name:'中文', dict:new Map(), }, [LANG_EN]:{ name:'English', dict:new Map(), }, }; const translateText=async (text,dest)=>{ console.groupCollapsed('请求翻译'); console.log(text); console.gr...
true
60d4250e7483296617b47b9efe5619f3069ff1bc
JavaScript
lXVILLALOBOSXl/UdemyHtml
/JS/IntroduccionJS/js/38.js
UTF-8
890
3.875
4
[]
no_license
//Fetch Api te permite enviar informacion al servidor u obtener informacion de un servidor async function obtenerEmpleados() { const archivo = 'empleados.json'; // fetch(archivo) //fetch funciona para traer la informacion de un archivo solicitado // .then( resultado => resultado.json()) //Despues de ...
true
a0421b0ab7fdccd7c04c8a357725b18bb5997ece
JavaScript
staceyrodriguez23/programming
/sketch.js
UTF-8
464
2.828125
3
[]
no_license
var x = 0 var y = 0 var sz = 0 function setup() { createCanvas(500, 500); } function draw() { background(173,216,230); fill(255,255,127,150); stroke(255,255,127); strokeWeight(15); if (mouseX > 1590 && mouseY < 250);{ fill("blue"); } ellipse(mouseX,mouseY,100,100); ellipse(x,135,100,100);...
true
52ffbfa98b998cae465f664986f9957330b6355b
JavaScript
Iyal-Khanjar/Fullstack-developer-Bootcamp
/Project And Exercises/3)JavaScript/18-ProtoTypes/27.2-pokemon/27.2-pokemon.js
UTF-8
630
3.46875
3
[]
no_license
function Pokemon(pokemonName, pokemonType, pokemonAttackList) { this.name = pokemonName; this.type = pokemonType; this.attackList = pokemonAttackList; this.callPokemon = () => { console.log(`I choose you, ${this.name}`); } this.attack = () => { console.log(`${this.name} used ${th...
true
3e97d68075da2fa1ccde85533c354ae9c31a55c6
JavaScript
hendiche/subayamu_Fr
/src/helpers/GeneralHelpers.js
UTF-8
1,410
3.25
3
[]
no_license
import moment from 'moment'; /** * Array of the rows-per-page dropdown for data tables * @return {array} of rows-per-page */ export const rowsPerPageItems = [5]; /** * Convert or formating date using moment.js * @param {string} date -> string of date from database that get from backend return API * @return {str...
true
afe21974e8fa44e4de0478f7a373abc07cddd4f6
JavaScript
TrevorFrench/frenchTrevor
/public/scripts/js.js
UTF-8
509
2.75
3
[]
no_license
function myFunction() { var y = document.getElementById("myText").value; var x = document.getElementById("myDIV"); var z = document.getElementById("yourDIV"); var zz = document.getElementById("loginDIV"); if (y === "BillingsSWMT") { if (x.style.display === "none") { x.s...
true
b58b2e98e366a741d2c2a34961071a2433033784
JavaScript
vilbak/projects
/task3/src/Components/Pages/Login/Container/LoginContainer.js
UTF-8
1,450
2.65625
3
[]
no_license
/* eslint-disable react/destructuring-assignment */ import React from 'react'; import LoginView from '../Component/LoginView'; class LoginContainer extends React.Component { constructor(props) { super(props); this.initialState = { email: '', password: '', errors: { email: '', ...
true
8a276d3ccd83ab4eb2b522888ca14e4abe9a433c
JavaScript
kiekk/study-typescript
/function/dist/rest-paramters.js
UTF-8
348
3.484375
3
[]
no_license
function colors(a, ...rest) { return a + ' ' + rest.join(' '); } let color1 = colors('red'); let color2 = colors('red', 'orange'); let color3 = colors('red', 'orange', 'yellow'); console.log(` color1=${color1} color2=${color2} color3=${color3} `); /* 실행 결과 color1=red color2=red orange color3=red...
true
59d22bcbf657820d1154056c87f56f64efcdfd41
JavaScript
gedanziger/intro-blockchain-development
/examples/class-8/test/gambling.test.js
UTF-8
3,163
2.515625
3
[ "MIT" ]
permissive
const Gambling = artifacts.require("Gambling"); const { assertRevert } = require('./helper/assertRevert'); const BigNumber = web3.BigNumber; require('chai') .use(require('chai-bignumber')(BigNumber)) .should(); contract('Gambling', async(accounts) => { let gamblingInstance = null; const fundAmount = 10 ** 18; ...
true
1179ff153606ce511a9192fcc23ae4a56dedc6e9
JavaScript
ngaspar/sess
/sess.js
UTF-8
3,312
2.90625
3
[]
no_license
var SESS = { eventSourceURL : null, pollingInterval : null }; function sessInit() { var esURL = window.location.href; if (SESS.eventSourceURL !== undefined && SESS.eventSourceURL != null) { esURL = SESS.eventSourceURL; } if (!!window.EventSource) { initEs(esURL); } else { // Use polling :( var...
true
f8352ba8cb0fb69584ec9e6248ad4f7ba818da3c
JavaScript
VitalyTokarev/FrontendSASS
/src/hooks/useEntitiesState.js
UTF-8
998
2.515625
3
[]
no_license
import { useState, useCallback } from 'react'; import { removeElementFromArray, getEditArray} from '../helpers/arrayMethods'; export const useEntitiesState = ( inititalVlaue = [] ) => { const [entities, setEntities] = useState(inititalVlaue); const addEntity = useCallback( (entity, _id) => { ...
true
03a883c47c8aca0189c6aa4a3578a429d1e5c325
JavaScript
lisniuse/is-pro
/src/types/time/leapYear.js
UTF-8
192
3.078125
3
[ "MIT" ]
permissive
// is the given year a leap year? const isLeapYear = function (year) { return this.number(year) && ((year % 4 === 0 && year % 100 !== 0) || year % 400 === 0); }; export default isLeapYear;
true
88ef2afcf75d0c56b5eddd4c3392acd79ef9894e
JavaScript
trongtaiz/Homework-1
/src/Component/Board.js
UTF-8
706
2.65625
3
[]
no_license
import React from "react"; import Square from "./Square"; function Board(props) { const { squares, onClick, winLine, boardSize } = props; const renderSquare = (i) => { return ( <Square key={i} value={squares[i]} onClick={() => onClick(i)} highlight={winLine && winLine.inc...
true
02435f52368003b6967a0334cde964b5f41a5fd8
JavaScript
csc302-2016-spring/group1
/flashcards/data/create-flashcard.js
UTF-8
989
2.875
3
[ "MIT" ]
permissive
var front = document.getElementById('front'); var back = document.getElementById('back'); var submit = document.getElementById('submit'); var categDropdown = document.getElementById('category'); /* Send the front and back flashcard text to index.js when * the form is submitted. */ submit.addEventListener('click', fu...
true
362abde38b4b25503e3510653a190eeac7a28ce5
JavaScript
KaiqueMunhoz/100-days-of-code
/projects/treinaweb/intermediate-functions/arrowFunctions.js
UTF-8
455
3.34375
3
[]
no_license
var myObj = { name: 'TreinaWeb', sayName(){ console.log(this.name); setTimeout(() => { //Arrow Function doesn't have scope. console.log(this.name); }, 1000); } } var myObj2 = { name: 'TreinaWeb', sayName : () => { //ERROR -> Without Scope console.log(thi...
true
9c1e5912a20ea92fb861823f07bad673df71d75e
JavaScript
abhaysinghs772/harry_potter_quiz_app
/harry_potter_quiz.js
UTF-8
4,250
3.234375
3
[]
no_license
const readlineSync = require('readline-sync'); const chalk = require(`chalk`); // console.log(chalk.bgYellow.blue(`hello world!`)); // var myName = `Abhay Kumar`; var userScore = 0; var highScore = 3; console.log(`Are you a Harry Potter Series fan, then take part in this quiz`); while (1) { var userName = readl...
true
915eb947d6394e1f8b362fcaeef8579c8e18a446
JavaScript
alexurdea/Decorator-and-CoR-experiments
/test/test-utils/utils.js
UTF-8
514
3.359375
3
[]
no_license
/* * Copyright (c) Philip Hutchison (http://pipwerks.com/2010/07/23/comparing-and-cloning-objects-in-javascript/) */ var clone_object = function (original_obj) { var new_obj = {}; for(var param in original_obj) { if(original_obj.hasOwnProperty(param)){ if(typeof(original_obj[param]) === "o...
true
fce1329ed92a73c6cca77f7e3fb2a6cb07708ea5
JavaScript
Cameriusm/delivery-node
/controllers/parseController.js
UTF-8
663
2.671875
3
[]
no_license
const axios = require('axios'); const { parseYandex, parseDelivery } = require('../modules/parseRestaurant'); const { checkHref } = require('../modules/checkHref'); exports.parse = async (req, res) => { const href = req.body.href; const restaurant = await checkHref(href, res); console.log(href + ' recieved ' + r...
true
eb81e7d047ee587dc718952be12d38a2119187c1
JavaScript
payros/visual-query-builder
/src/js/schemaStore.js
UTF-8
1,713
2.734375
3
[ "MIT" ]
permissive
import axios from 'axios' import { EventEmitter } from 'events' import dispatcher from './dispatcher' class SchemaStore extends EventEmitter { constructor() { super() this.schema = {} this.filtering = false this.grouping = false this.ordering = false this.errorLog = "" } setSchema(schema...
true
d860069e6e3b85d969739886fad6445a11096cff
JavaScript
ahribori/daily-algorithm
/solutions/leetcode/Unique Paths.js
UTF-8
885
3.75
4
[]
no_license
/** * @param {number} m * @param {number} n * @return {number} * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 시간초과 failed */ const uniquePaths = function (m, n) { let answer = 0; function dfs(x, y) { if (x === m && y === n) { answer++; } if (x < m) { dfs(x + 1, y); } if (y < n) { dfs(x...
true
aa69dd9ee598361605f0771fce0707bb40f8c898
JavaScript
geebataglia/std-hub
/01-java-script/basico-javascript/2.trabalhandoComVariaveis.js
UTF-8
105
2.59375
3
[]
no_license
console.log("Trabalhando com variáveis"); const idade = 34; const nome = "Guilherme"; let ano = 2021;
true
f5ebffdfc2549ce5e79d08da669912fc3822c196
JavaScript
Breezeds/js-design-pattern
/src/index.面试题1.js
UTF-8
695
3.734375
4
[]
no_license
// 车 父类 class Car { constructor(number, name) { this.number = number; this.name = name; } } // 子类-快车 class Kuaiche extends Car { constructor(number, name) { super(number, name); this.price = 1; } } // 子类-专车 class Zhuanche extends Car{ constructor(number, name) { super(number, name); this.price = 2; ...
true
9cd2e2defc55c8620c3668785127653ec8c73db7
JavaScript
zumot/JQACL
/js/plugins.js
UTF-8
1,036
2.703125
3
[]
no_license
function selectFirstClass(e) { setSeat(e, selectFirstClass); var resulting_html = fetchFirstClassConfirm(); $('#confirm-first-class').html(resulting_html); $('#confirm-first-class').show(); $('#confirm-seat').hide(); } function fetchFirstClassConfirm() { // This function should deals with AJAX call... I on...
true
94697def87582b0a53778edf0327ad9e2fe8c82b
JavaScript
kumano-dormitory/kumanodocs-hanami
/apps/web/assets/javascripts/comment_side_navigation.js
UTF-8
1,552
2.625
3
[]
no_license
function toggleDrawer(sideNavigation, show) { if (sideNavigation) { if (show) { sideNavigation.classList.remove('is-collapsed'); sideNavigation.classList.add('is-expanded'); } else { sideNavigation.classList.remove('is-expanded'); sideNavigation.classList.add('is-coll...
true
70492e68440604eb95d08a5f098abc92024fc95d
JavaScript
DonorToken/DonorToken
/test/DonorToken.js
UTF-8
2,166
2.6875
3
[ "MIT" ]
permissive
'use strict'; import expectThrow from './helpers/expectThrow'; var DonorToken = artifacts.require('DonorToken'); contract('DonorToken', function(accounts) { let token; beforeEach(async function() { token = await DonorToken.new(); }); it('should start with a totalSupply of 0', async function() { let ...
true
6038957203a7bc9fa46566395ee548b8ec92f920
JavaScript
harshitbhat/Data-Structures-and-Algorithms
/LeetCode/Topicwise/Tree/009.maximum-depth-of-n-ary-tree.js
UTF-8
449
3.234375
3
[]
no_license
/** * // Definition for a Node. * function Node(val,children) { * this.val = val; * this.children = children; * }; */ /** * @param {Node|null} root * @return {number} */ var maxDepth = function (root) { if (!root) return 0; let ans = -1; const traverse = (root, curr) => { ans = Math.max(ans, c...
true
eacd9bf370a1f1582a77de561c42389e1e3d17e3
JavaScript
joglekard/nayan
/code/javascript/2/2.1/numbers.js
UTF-8
130
3
3
[]
no_license
for (var i = 1; i <= 100; i++) { document.write(i+" "); if(i%10==0){ document.write('<br></br>'); } }
true