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
26cde88f16e5e31fa0d66de0d42a18769879cbd0
JavaScript
rpt08-kashyyk/main
/services/calendarServer/mockDataGenerator.js
UTF-8
2,858
2.78125
3
[]
no_license
var fs = require('fs') var moment = require('moment') var startTime = new Date().getTime(); var start = { "propertyID":0, "lattitude":0, "longitude":0, "dailyRent":100.0, "cleaningFees":20, "serviceFees":10, "taxesAndFees":10, "randomPriceDeal":'10% off if you book the entire week', ...
true
e5d871cc7449e1e3c5e615b875f8b297483bde39
JavaScript
Kthal21/Superhero
/Hero.js
UTF-8
587
2.59375
3
[]
no_license
class Hero{ constructor(x,y,width,height){ var options={ density:4, frictionAir:0.03 } this.body=Bodies.rectangle(x,y,width,height,options); this.width=width; this.height=height; World.add(world,this.body); // this.image= loadImage ("sprites/Superhero-01.png"); ...
true
f2c2cdaf1d387426e406df411b84614d2925fe25
JavaScript
Jsmithseo/poinz-app
/deploy/lib/commandHandlers/importStories.js
UTF-8
1,894
2.53125
3
[]
no_license
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _parseCsvDataUrlToStories = _interopRequireDefault(require("./parseCsvDataUrlToStories")); var _hasActiveStories = _interopRequireDefault(require("./hasActiveStories")); function _interopRequireDefault(obj) ...
true
60ac8d00865fdd240f81d8e23eac1f8840d58af6
JavaScript
imkrish513/newchess
/queen.js
UTF-8
69,152
2.890625
3
[]
no_license
function Queen(){ WhiteGroup.add(pawn1, pawn2, pawn3, pawn4, pawn5, pawn6, pawn7, pawn8, elephant1, elephant2, horse1, horse2, camel1, camel2, king, queen) if (turn % 2 === 0) { if (mousePressedOver(queen) && round === 0) { pressed = 20 round = 20 } if (pressed =...
true
4a92378c8b14dd4e18d9ed63c571da6c13d9db74
JavaScript
breannasmith1/Javascript
/simple_page/scripts/week2.js
UTF-8
2,037
3.921875
4
[]
no_license
/*global document, alert, console*/ /*jslint devel: true*/ /*eslint no-console: 0*/ /*eslint no-unused-vars: 0*/ /*jslint devel: true*/ /*global document, console*/ /*eslint no-console: 0*/ document.getElementById("paraOne").style.color = "blue"; console.log("Hello, world!"); // MODULE 2 CHALLENGES! // Create a serie...
true
270be7930594a822ce105190872525b3518c5341
JavaScript
ladral/kpi-dashboard
/views/current/data.remote.js
UTF-8
755
2.6875
3
[]
no_license
/****************************/ /* model */ /****************************/ export default class Data { // constructor which gets server url constructor(serverUrl) { this.serverUrl = serverUrl } async getActualValues(callback){ let url = new URL(this.serverUrl + "/oe...
true
d5f4448515b57bf43c0c1a40ac9664a4c77c841f
JavaScript
jayson3110/2authentication
/src/controllers/AuthController.js
UTF-8
4,936
2.984375
3
[]
no_license
/* File nay sẽ chứa toàn bộ các controllers có liên quan đến xác thực- Authentication. const MOCK_USER: đây là biến mà tạo ra với " mục đích giải lập thông tin một user ", phục vụ cho việc demo ứng dụng , nếu là dự án thực tế thì dĩ nhiên thông tin này sẽ phải đảm bảo là lưu được vào cơ sở dữ liệu ...
true
bce57f01a7868eee68093ce0969d7b6085d44fad
JavaScript
IwasaAkifumi/the-work
/作品集/game/弾幕ギャラクシー/New Unity Project 9/Assets/script/Enemy/EnemyController6-3.js
UTF-8
1,630
2.59375
3
[]
no_license
#pragma strict var LookAtTarget : Transform;//プレイヤーを設定 var damp = 6.0; var bullitPrefab : Transform;//弾のプレファブを設定 var savedTime = 10;//弾の発射頻度 var score : int; static var Enemylife : int; var explodePrefab : GameObject; function Start () { Enemylife = 100; } function Update(){ if(LookAtTarget){ var ro...
true
3670f2d9dae7d2b43d8d33e008b7ad2cf0ebc51d
JavaScript
Anastasia-Belik/russian-map
/russian-map.js
UTF-8
12,456
2.546875
3
[]
no_license
/** * Рендер Российской карты. * * Перед подключением этой библиотеки должна быть подключена библиотека RaphelJS: * * @see http://dmitrybaranovskiy.github.io/raphael/ * * Состав опций: * - mapId - идентификатор элемента, в котором будет срендерена карта * - width - ширина карты * - height - высота карты * - ...
true
1e123120624d47f5587158c664bd11228ef9cff8
JavaScript
ccWjchen/NodeJS_Examples
/Chapter3/ex8.js
UTF-8
499
3.375
3
[]
no_license
function collectData() { /* 從網路收集資料的程式 在這段程式中,會傳回收集到的資料 */ return ""; // 為了示範自定義錯誤,所以傳回空字串 } try { var receiveData= collectData(); if (receiveData==="") { throw new Error("收集資料錯誤"); } } catch (errorObject) { console.log(errorObject.message); return; } /* receiveData不是空字串,可以繼續以程式處理收集到的資料 */ console.log("...
true
7a3bb6007c883f847c0332d4a42fdeecbb6c8704
JavaScript
theand-exercises/mail-programming-quiz
/09/js/testcase.js
UTF-8
1,214
2.90625
3
[ "MIT" ]
permissive
console.log("-----------------------move zero to right"); let func = moveZerosToRight; const input0 = [6, 5, 4, 3, 2, 1]; const result0 = [6, 5, 4, 3, 2, 1]; const input1 = [0, 5, 0, 3, -1]; const result1 = [5, 3, -1, 0, 0]; const input2 = [3, 0, 3]; const result2 = [3, 3, 0]; const input2a = [3, 0, 0, 3]; const r...
true
02fdbf014735bcb294d4f291ec2a8169a2b1a54b
JavaScript
Kelebra28/Cinta_Blanca_40
/08_Condicionales/main.js
UTF-8
1,139
4.03125
4
[]
no_license
// if(condindicion){ // accion que se ejecuta si se cumple la condicion // }else{ // accion que se ejecuta si no se cumple la condicion // } let num1 = 10 if(num1 !== '10'){ // console.log('Es verdadero') }else{ console.log('Es Falso') } //Comparar si un numero es par o impar //------------> Modulo...
true
90f2fa680e0532d8c7da65d74f7ae6d72a28b149
JavaScript
KR3KZ/dumb-treasure-hunt
/scripts/messageHandler.js
UTF-8
1,401
2.921875
3
[]
no_license
/* Classe Static MessageHandler Gère les messages */ class MessageHandler { //Messages du chat static chatFailedMessages = [ "T'es naze", "Nul nul nul", "Absolument pas !", "Eclaté au sol", ]; static msg = { chatGoodLineMessage: "T'es sur la bonne ligne !", chatGoodColumnMess...
true
9d0eddcbccb4c5b81df53da505f752efb37abb22
JavaScript
PawelJarema/EA
/routes/chatRoutes.js
UTF-8
3,131
2.578125
3
[]
no_license
const requireLogin = require('../middleware/requireLogin'); const mongoose = require('mongoose'); require('../models/Chat'); const Chat = mongoose.model('chat'); const { ObjectId } = mongoose.Types; const multer = require('multer'); const upload = multer(); const getUnseenChats = async id => { let chats = await Chat...
true
7fb89ee574b9369b357769551f2928b83b696b9c
JavaScript
gearoffortune/shri-task-1
/src/activity/index.js
UTF-8
4,882
2.765625
3
[]
no_license
import { html } from "../html-IoC"; import "./styles.css"; const performanceBlocks = [ html`<div class="activitychart__activityrow__activityblock activitychart__activityrow__activityblock--min" ></div>`, html`<div class="activitychart__activityrow__activityblock activitychart__activityrow__activityblock-...
true
98a5f0a643dc6af733df3155e4ed9826598215e2
JavaScript
awesometype/WayToRN
/ECMAScript 新功能/11.剩余操作符Rest.js
UTF-8
446
3.484375
3
[]
no_license
/** * Created by mudy on 18/4/8. */ 'use strict'; // ...还表示rest 一般用在函数的参数中 function breakfast(dessert,drink,...foods) {//除了之前的参数之外的参数会放在一个叫做foods的数组中 console.log(dessert,drink,foods) //cake tea [ 'ice', 'lemon' ] console.log(dessert,drink,...foods)//这里表示的是解构,会输出数组中的内容 cake tea ice lemon } breakfast('cake',...
true
9f558fc5a963e45c35a84d7650c80d9b18b31bd8
JavaScript
mesquini/be-the-hero
/frontend/src/pages/Register/index.js
UTF-8
3,374
2.59375
3
[ "MIT" ]
permissive
import React, { useState } from 'react'; import { Link } from 'react-router-dom'; import { FiArrowLeft } from 'react-icons/fi'; import logo from '../../assets/logo.svg'; import NumberFormat from 'react-number-format'; import Modal from '../../components/Modal'; import { Container, Section, Form, Text, Desc...
true
8c99fc3831bc86eb0f63ec5587acaba9e1ebc459
JavaScript
angelikahoeflich/grocery-list-2
/src/App.js
UTF-8
3,942
2.890625
3
[]
no_license
import React, {Component} from 'react'; import './App.css'; import Axios from 'axios'; import IngredientsList from './Components/IngredientsList'; import SelectedIngredients from './Components/SelectedIngredients'; import Header from './Components/Header'; class App extends Component { constructor(){ super(); ...
true
d177b2d861a26c97d3b77464db92106d352042fb
JavaScript
pairsupit/TMDB_API-Bootstrap5-Node
/showItemInMyList.js
UTF-8
3,292
2.640625
3
[]
no_license
let showMyList = document.getElementById('showMyList'); let collection = ''; // SHOW ALL ITEM IN MY LIST fetch(`http://localhost:3000/getItemList`, { headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' }, method: 'POST', body:...
true
c0aa5f78a89866dddd7c5737a2eee415f3849fa5
JavaScript
jrscodeschool-5-2019/jrscode-2019-tnw-day2
/src/multiply.js
UTF-8
230
3.09375
3
[]
no_license
/** * multiply function * * takes two values and multiplies the first by the second * * @param {Number} a * @param {Number} b * * @returns Number */ const multiply = (a, b) => { return a * b } export default multiply
true
1226913e7350d822d93ecce7d4e782037ec13248
JavaScript
barrard/stock_panel
/src/indicators/indicatorHelpers/MovingAverage.js
UTF-8
8,616
2.75
3
[]
no_license
const { sum, mean, median, deviation, max, min, extent } = require("d3-array"); const getClose = (d) => +d.close; const getOpen = (d) => +d.open; const getHigh = (d) => +d.high; const getLow = (d) => +d.low; const getVolume = (d) => +d.volume; const getTimestamp = (d) => +d.timestamp; export { findDeviation, win...
true
4b3068b56cbd5e390fd985b79aa87c309a5efd83
JavaScript
jonkeda/xdompath
/test/Compiler/Combiner.js
UTF-8
667
2.5625
3
[ "MIT" ]
permissive
import { Compiler } from "../../src/Compiler/Compiler"; import { XpathTokenizer } from "../../src/Tokenizer/XpathTokenizer"; const XPATH_TEST = './div/span'; describe('combiner', function() { it('should test grouper', function() { let container = document.createElement('li'); const compiler = new ...
true
346fe02216bcccac66551ca2d0ed711161b6beb1
JavaScript
lhbelfanti/umbrella
/src/js/persistence/persistence.js
UTF-8
844
2.90625
3
[ "MIT" ]
permissive
export default class Persistence { constructor() { this._temperatureScale = localStorage.getItem("temperatureScale") || "celsius"; this._language = localStorage.getItem("language") || "es"; this._location = localStorage.getItem("location") || "Buenos Aires, Argentina"; } save() { localStorage.setItem("tempe...
true
079161c5befc6023d3a4036bba39b393ea2e6e4b
JavaScript
mikhalko98/auth
/src/framework/core/component.js
UTF-8
858
2.921875
3
[]
no_license
import {wfn} from "../tools/util"; export class Component { constructor(config){ this.template = config.template; this.selector = config.selector; this.el = null; } render(){ this.el = document.querySelector(this.selector); if(!this.el) throw new Error(`Component wi...
true
b70aae1eb51a7890f47de6cd6cda00b1326cec9f
JavaScript
software-foundations/learning-js
/cod3r/41_point_notation/01_point_notation.js
UTF-8
333
3.53125
4
[ "MIT" ]
permissive
console.log(Math.ceil(6.1)) const obj1 = {} obj1.name = 'Ball' // obj1['name'] = 'Ball 2' console.log(obj1.name) function Obj(name) { this.name = name this.exec = function() { console.log('Exec ...') } } const obj2 = new Obj('Chair') const obj3 = new Obj('Desk') console.log(obj2.name) console.log(obj3.name)...
true
d75088f61147c940afdac7bacbccd2beb3767d57
JavaScript
AleOchoa/lab-canvas-hangman
/starter_code/canvas.js
UTF-8
2,758
3.421875
3
[]
no_license
class HangmanCanvas { constructor(secretWord) { this.ctx = document.getElementById('hangman').getContext('2d'); } createBoard() { let ctx=this.ctx ctx.lineWidth=10 ctx.lineCap="round" ctx.lineJoin="round" ctx.fillStyle="white" ctx.fillRect(0,0,1200,800) ctx.beginPath(); c...
true
64e645c91fbfde571d94d909c8d86d8448485378
JavaScript
Jordi0M/GestorDocumental
/public/js/script.js
UTF-8
11,628
2.859375
3
[ "MIT" ]
permissive
function cerrarModalNuevoCliente(){ window.location='/'; } function cerrarModalNuevoFichero(id_venta, id_cliente){ window.location='/cliente/venta/'+id_venta+'/'+id_cliente; } function listadoClientes(datosJSON){ //php recoge los datos, y los guardamos en una variable de javascript var datos = datosJSON; //v...
true
f5614e1d0eb2ef84fd36705509a6fa3346d4beb1
JavaScript
rendertom/PseudoEffect
/src/lib/FolderEx.js
UTF-8
415
2.859375
3
[ "MIT" ]
permissive
var FolderEx = (function() { var module = {}; module.ensureFolderExists = function(folder) { folder = module.getFolderObject(folder); if (!folder.exists) { if (!folder.create()) { throw 'Could not create folder ' + folder.fsName; } } return folder; }; module.getFolderObject = function(folder) ...
true
eedea7fc46c1c94836e3dfca233ce32cd9f9bf5b
JavaScript
MikeyCouture/APCaseStudy
/script.js
UTF-8
2,694
3.109375
3
[]
no_license
const olaApp = {}; olaApp.init = function (){ // Grabbing the results stat div let allStats = document.querySelector(".results__content--stat"); // Returning the position of stat div to see if it's in the viewport const isInViewport = function (elem) { let bounding = elem.getBoundingClientRec...
true
64592aff957fef2428f03be541f7da04d821c2b9
JavaScript
justinkwanchan/profile_generator
/survey.js
UTF-8
2,074
3.390625
3
[]
no_license
// W02D2 - Fun Profile Generator // Dynamically create a profile for a user based on answers given on the stdin const readline = require('readline'); const rl = readline.createInterface({ input: process.stdin, output: process.stdout }); const queryObj = [ { type: 'name', question: "What's your name? Nicknames ...
true
74aebfa4c510c12f4c28022e73b28368eb0465a8
JavaScript
velezjose/DS-and-Algos
/MathEvaluation/RPN.js
UTF-8
870
3.71875
4
[]
no_license
let helper = (op, nums) => { let s = nums.pop(); let f = nums.pop(); let result; if (op === '+') { result = f + s; } else if (op === '-') { result = f - s; } else if (op === '*') { result = f * s; } else if (op === '/') { result = f / s; } else if (op === '%') { result = f % s; } ...
true
94c0e0e38b71baf51b97e9c1fd328df9db4c5269
JavaScript
felipebelisario/Periodo-8
/PPI/trabalho3/ex1/script.js
UTF-8
1,134
3.296875
3
[]
no_license
window.onload = function() { // Assim que a tela for carregada a função declarada sera executada const modal = document.querySelector(".modal"); // Recebe objeto referente ao modal pegando a partir da classe 'modal' const buttonClose = modal.querySelector(".buttonClose"); // Recebe objeto referente ao botao de ...
true
6e039511d1084e4052f680f89f8d11cdf5e14f20
JavaScript
dzanang/WebAPI
/Angular/scripts/controllers/EmployeeController.js
UTF-8
1,781
2.59375
3
[ "MIT" ]
permissive
(function () { var app = angular.module("test"); app.controller("EmployeeController", function ($scope, $rootScope, DataService) { var dataSet = "employee"; //we are defining where are we getting our data from $scope.selString = ""; $scope.sortOrder = ""; fetchData(); ...
true
7a90a97157b40cda4529ddbc86cab23853778ee4
JavaScript
sofyp/javascript
/dom/js/teht1.js
UTF-8
1,491
2.921875
3
[]
no_license
/*korvaa listan tiedot omillasi*/ /*lisää listaan puhnro -lisää otsikko th-elementillä*/ /*poista nikki- ja sen otsikko*/ const enimi= document.getElementsByTagName('td')[0].innerHTML= '<td>sofia</td>'; const snimi= document.getElementsByTagName('td')[1].innerHTML='<td>ylip</td>'; const nikki= document.getElementsByTa...
true
27f89399c174e1b2d915d2fc9366ab732482a456
JavaScript
debamitro/homesocial
/client/web/public/js/main.js
UTF-8
768
2.515625
3
[ "Apache-2.0" ]
permissive
window.utils.on_ready ( () => { const server_port = 3001 window.core.get_posts (`http://${server_host}:${server_port}`); window.setInterval ( () => window.core.get_posts (`http://${server_host}:${server_port}`), 2000); document.getElementById ('new-post-submit').addEventListener('click', (event) => { ...
true
93e33999b70c027a30911b6d6c4ddb475cefbb5e
JavaScript
huyho95/ReactJs-Basic
/src/App.js
UTF-8
3,136
2.5625
3
[]
no_license
import './App.css'; import Product from './component/Product' import React, { useRef } from "react"; function App() { function showInfoProduct(product) { if (product.status) { return <h3> Id: {product.id} <br /> Name: {product.name} <br /> Price: {product.price} <br /> </h...
true
c32101089551f1f768bdc10357db05107d7cc3a6
JavaScript
xiaoyaosuifeng/webpack-lianxi
/src/js/home.js
UTF-8
611
3.140625
3
[]
no_license
import fn from './commom'; const [a,b,c]=[1,2,3]; let d=1; console.log(a,111111111); const timer=setInterval(()=>{ d++; console.log(d,2222222); },2000) console.log(d,3333333); class person { constructor (x,y){ this.x=x; this.y=y; } getBirth(){ const birth=new Date().getFullYe...
true
12fd7afdfe53cc02381cf9829056f37f8fd802d0
JavaScript
belexos/hummersmyth
/spec/HummersmythSpec.js
UTF-8
11,457
2.515625
3
[ "MIT" ]
permissive
/** * Hummersmyth - HTML renderer and DOM creator for Node.js and the browser. * * @copyright: Copyright (c) 2013-present, Belexos * * @author: Br00ze <br00ze@belexos.com> * * @license This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ ...
true
dee11f09b9258a8c046229f1395a824a8f119070
JavaScript
Randikaviraj/Node-Notification-Server
/index.js
UTF-8
1,790
2.609375
3
[]
no_license
const express = require("express"); const app = express(); const http = require("http").Server(app); const io = require("socket.io")(http,{ path: "/notification/" }); const bodyparser = require("body-parser"); const ts = Date.now(); const date_ob = new Date(ts); const PORT = process.env.PORT || 3000; var sendedList...
true
ec8c9b72d8045d113d71a3858c2ded1c55af487d
JavaScript
Ko5t1C/wagtail-react-project
/frontend/src/utils/getNextAndPrevPath.js
UTF-8
1,836
2.734375
3
[]
no_license
const getNextAndPrevPath = (menu, location) => { const { pathname } = location const result = { prev: '', prevTitle: 'Home', next: '', nextTitle: 'Contact' } if (pathname === '/') { result.prev = { pathname: '/contact', state: { prev: false, index: 10 } } result.next = { ...
true
fb6cee67544ce5c553bf3207e59110df0e547fce
JavaScript
li17623640359/hbxt
/static/js/public.js
UTF-8
954
2.765625
3
[ "MIT" ]
permissive
/** * 公共JS函数文件 * @date: 2018年5月12日下午4:40:37 * @author: Hhb */ /** * 正整数检测 */ function js_check_integer(val){ if(val == ''){ return false; } if((/^\+?[1-9][0-9]*$/.test(val)) && val > 0){ return true; }else{ return false; } } /** * 检测客户端是否为微信 * @returns {Boolean} */ function js_check_is_wechat(){ v...
true
f33ea9b469543476f679c587f8932b044a2575b8
JavaScript
Bakhti-Salma/week1
/week1/1-logic-error.js
UTF-8
404
3.90625
4
[]
no_license
// The syntax for this function is valid but it has an error, find it and fix it. function trimWord(word) { return '"'+word+'"'; } console.log(trimWord(" CodeYourFuture ")); function getWordLength(word) { return word.length ; } console.log(getWordLength("A wild sentence appeared!")); function mu...
true
0ab6aa0e171ab93acda90a3abb58d77bf9dbabb2
JavaScript
govindsharma7/angular_tables
/messages.js
UTF-8
1,318
2.640625
3
[]
no_license
/** * Created by hariharaselvam on 7/27/16. * Custom alert message from bootstrap models * Automatic dismissed * message.alert(true|false|null, "Message to display") * */ window[appName].factory('message', function () { return { alert: function (flag, message) { var divhtml = "<div class='al...
true
c84681b63618666470a1fa47e02634b09138d07c
JavaScript
thaotram/uit.weather
/src/client/script/modules/component/style/src/setRule.js
UTF-8
911
2.53125
3
[]
no_license
import insertRule from './insertRule'; import getStyleElement from './getStyleElement'; // properties => noOverwriteProperties module.exports = function setRule(selector, rules, group, overwrite) { getStyleElement(group, (sheet) => { if (!overwrite) { if (sheet.properties.indexOf(selector) == -...
true
a5b2143905aae122610eac72c9cbd18ed9392e04
JavaScript
belyan/library
/js/flanagan5/Drag.js
UTF-8
2,834
3.3125
3
[]
no_license
/** * Drag.js * * Данный модуль определяет единственную функцию drag(), которая предназначена * для вызова из обработчика события onmousedown. Последующие события mousemove будут вызывать * перемещение заданного элемента. * Событие mouseup завершит операцию перетаскивания. * Если элемент перемещается за пределы ...
true
818df5c0fa81324efb63c21e64e6dd12187a5c9c
JavaScript
mohamedelshorbagy/babel-config-node
/src/api/routes/user.js
UTF-8
1,475
2.671875
3
[]
no_license
import * as express from 'express'; // Models import User from '../models/user'; // Helpers import { errorJSON } from '../controllers/helpers'; const router = express.Router(); /** * * @method: GET * @desc: Get All Users In Database * @return: Return Array Of Users { name , age } * */ router.get('/all', (...
true
0d276c37ce34091202ed1490363643f3dfcbe793
JavaScript
Sletheren/Game-flappybird
/sketch.js
UTF-8
801
3.046875
3
[]
no_license
const WIDTH = 400 const HEIGHT = 600 const BIRD_SIZE = 20 const FRAMES_PER_PIPE = 85 let bird let pipes = [] function setup () { createCanvas(WIDTH, HEIGHT) bird = new Bird() pipes.push(new Pipe()) } function draw () { background(0) for(let i=pipes.length-1; i>=0; i--) { pipes[i].show() pipes[i].update() ...
true
41300ca179db709b0b27004e43d16268fafaf0ad
JavaScript
Le1779/learn-js
/dyna-logo/le-dynacw-logo.js
UTF-8
11,987
2.671875
3
[]
no_license
var Point = function (x, y) { return { x: x, y: y }; }; var DynaCWLogo = function (builder) { let canvas = builder.canvas; let context; let viewHeight; let viewWidth; let centerX; let centerY; let margin; let block = []; initCanvas(); initBlock(); v...
true
65a28ae03bf536c47f58f92dcf7564d5aa8afbf2
JavaScript
Joeycho/javascript-hide-and-seek-bootcamp-prep-000
/index.js
UTF-8
511
3.171875
3
[ "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unknown-license-reference" ]
permissive
function getFirstSelector(selector) { return document.querySelector(selector) } function nestedTarget() { return document.getElementById("nested").querySelector('div.target') } function increaseRankBy(n) { const lis = document.querySelectorAll('ul.ranked-list li') for(let i =0; i<lis.length;i++){ lis[i]....
true
0198b187ffcca60a37b34f5fdf091c07520b9902
JavaScript
Juhye-Kim/Boosting-Study
/서인수/210629/가장긴펠린드롬.js
UTF-8
1,592
3.984375
4
[]
no_license
function solution(s) { // 접근 펠린드롬이 길이가 짝수일때와 홀수일때 2가지 경우를 나누어서 생각 // 풀이방법 // 1. 문자열 순회하며, 짝수/홀수에서 각각 가능한 펠린드롬 길이를 모두 answer에 담는다. // 2. checkOdd // 2.1 펠린드롬이 홀 수 일때는, 기준 idx를 기준으로 좌우로 +-1의 문자열을 비교한다. // 문자열의 한쪽 끝에 도착할 때까지 while 문 실행 // 만약 좌우문자열 같다면 1) cnt+2 2) left - 1, right + 1 // 좌우문자열 같지 않다면 바로 종...
true
93a747305c2d307c1ae5126387dc7972f67fd7a3
JavaScript
tomcomiks/ThreeDimensionalIndex
/js/camera.js
UTF-8
7,294
2.5625
3
[]
no_license
/** * App Name: ThreeDimensionalIndex * Plugin URI: https://github.com/tommelani/ * Version: 1.0.0 * Author: Tom Melani * Author URI: https://github.com/tommelani/ * Description: Display a 3D Index of various items */ /** * Class THREE_DIMENSIONAL_INDEX.Camera */ var THREE_DIMENSIONAL_INDEX=THREE_DIMENSI...
true
4f91d3008521df25e974f3ad1b969a53f53d327d
JavaScript
jakubzika/monitor
/client/src/js/components/monitor/monitor.js
UTF-8
3,744
2.53125
3
[ "MIT" ]
permissive
import React from 'react'; import ReactDOM from 'react-dom'; import $ from 'jquery'; import * as d3 from 'd3'; import _ from 'lodash'; let chart = {}; let height = 200; function invert(value) { return ((height/2)-value)+(height/2); } chart.create = function (selector,data) { chart.height = 200; let svg = d3....
true
b953c07f9ac109d3178bdb9bcd1827b8abab5ce2
JavaScript
niksy/modernizr-esm
/feature/forms/formattribute.js
UTF-8
997
2.515625
3
[ "MIT" ]
permissive
/** Original source code: https://github.com/Modernizr/Modernizr/blob/v3.11.4/feature-detects/forms/formattribute.js **/ import Modernizr from "../../src/Modernizr.js"; import createElement from "../../src/createElement.js"; import docElement from "../../src/docElement.js"; Modernizr.addTest('formattribute', function (...
true
e0400cc365fe5e95c553d1513f00b6e27199b668
JavaScript
Anitt/EcommerceRentalWebApp_LeaseWithEase
/Front-End/assignment2-Vinod/payment_checkout.js
UTF-8
2,537
3.03125
3
[]
no_license
function form_validation() { $("div.name-error").empty(); $("div.bill-addr-error").empty(); $("div.card-no-error").empty(); $("div.cvv-cd-error").empty(); $("div.exp-dt-error").empty(); var name_pattern = /^[A-Za-z ]+$/; var bill_addr_pattern = /^\d+\s{1}[a-zA-Z]+\s{1}[a-zA-Z]+$/; var c...
true
55ad7bcda538ba5d9d8ace2be7190114fc2d930e
JavaScript
marciafranklin/dlnmovingonup
/js/scripts.js
UTF-8
3,886
2.71875
3
[]
no_license
// Workaround to keep menu open when navigating down through // submenus on for touch/mobile devices $(document).ready( function() { $(document).on("touchstart", "li.dropdown-submenu > a", function(){ $("li.dropdown-submenu").removeClass("active"); $(this).parent().addClass("active"); return...
true
4b4d442378b81601681985fb0bdb7f8aec247b7b
JavaScript
lcoronado7/project_chatbot
/eventos/static/js/chat/chat.js
UTF-8
5,403
2.671875
3
[]
no_license
$(document).ready(function(){ // Verificar si existe una conversacion en curso if ($.cookie("chatToken") != null) { //se llama a funcion para obtener conversacion si existe obtenerConversacion($.cookie("chatToken")); } // Toggle para abrir y cerrar box-chat $(".title-chat").click(function() { $(".box-...
true
b2ef2b732d6f036a8569f1d13f135c4c38989e97
JavaScript
Joilence/Web2.0-SYSU-Course
/hw8-TableSorter/UpdateOldHW/Games/mole.js
UTF-8
2,319
3.140625
3
[]
no_license
window.onload = function () { // Status var gameBegin = false; var time = 0; var score = 0; function initHole() { for (var i = 0; i < 15 * 15; ++i) { var hole = document.createElement("div"); hole.className = "hole"; $("#mole-hole").append(hole); ...
true
057959a26dc1cd5c983ede9295a6ad52c52a09f6
JavaScript
Dabbo07/pixelJS
/lines.js
UTF-8
3,427
2.953125
3
[]
no_license
(function () { var rootApp = app; var lineApp = function() { var canvas; var ctx; var lines = []; var maxLines = 100; var timeSecs = 1; function newPoint() { var rx = Math.ceil(Math.random() * 300); var ry = Math.ceil(Ma...
true
4ed89400c26555dc47a90504abba62a10a9ef408
JavaScript
madhu-patidar/training
/javascript/js/validationfile.js
UTF-8
4,545
2.9375
3
[]
no_license
function validateform(){ var firstname = document.myform.firstname.value; var lastname = document.myform.lastname.value; var phone = document.myform.phone.value; var office = document.myform.office.value; var email = document.myform.email.value; var password = document.myform.password.value; ...
true
df0efc34f54c2f458cc7b30937789ac98aba58a3
JavaScript
Mark-Kamitz/FE-21-Ts-Day1-Markus-Christoph
/Mark/basic2/basic2.js
UTF-8
694
3.515625
4
[]
no_license
// document.write("hello again"); // let names: Array<{ // fName : string, // lName : string // }> = [{ // fName: "Mark", // lName: "Millions" // }] var names = { first: 'Mark', last: 'Millions' }; document.getElementById("output").innerHTML += names.first + " " + names.last + "<br><br>"; for (v...
true
e514039298bc88e3e26de8a1ef8197d06fea7c4c
JavaScript
adv2/socIoScr
/ytsoc.js
UTF-8
9,152
2.9375
3
[]
no_license
// Разработка простого чата на Socket.IO [2016] \ Node.js // https://habrahabr.ru/post/307744/ var express = require('express'); // Подключаем express var app = express(); var server = require('http').Server(app); // Подключаем http через app var io = require('socket.io')(server); // Подключаем socket.io и указываем н...
true
5aad30293b19768509706b184754e7cc5faaf58d
JavaScript
sana0216/assua
/arrow1.js
UTF-8
250
4.15625
4
[]
no_license
//example 1: function doSomething (){ console.log("Doing Something is normal function"); } doSomething(); //lets rewrite the above normal function as arrow function var func1 = () => console.log('Doing Something in arrow function'); func1();
true
05598d6f8e1a54b83c96adfd663407ec7f8a531e
JavaScript
LinqLover/downstream-repository-mining
/packages/core/test/references.test/examples/dependents/bar/index.js
UTF-8
471
2.765625
3
[ "MIT" ]
permissive
var heu = require('heureka'); var heuUtil = require('heureka/util'); var heuUtilSync = require('heureka/utilSync'); var firstWhole = heu.makeWhole("eenie", "meenie", "minie"); console.log(firstWhole.getName()); var somePart = firstWhole.lastPart(); console.log(somePart.name); var newPart = new heu.Part("hello"); var ...
true
f393916cebb9506c9f57ae482b6d761312742c8f
JavaScript
Crizzooo/zombiez
/client/src/gameStates/zgsHelpers/handleRemoteAnimation.js
UTF-8
3,573
2.59375
3
[]
no_license
/** * Created by CharlieShi on 3/24/17. */ import { throttle } from 'lodash'; import { handlePlayerRotation } from './handlePlayerInput' //TODO: refactor export default function handleRemoteAnimation(player) { if (player) { //player.pointerX = player.game.input.activePointer.worldX; //player.pointerY = pla...
true
e8b7e880978440333e9a0004611865bf6e1a5e35
JavaScript
XTusers/Web-201
/139585_Deepak/src/js/models/Search.js
UTF-8
550
2.75
3
[]
no_license
export default class Search { constructor() { this.results = []; } item(allItems, key) { try { const _this = this; if (key) { var regex = new RegExp(key, 'i'); $.each(allItems, function (key, val) { if (val.name.sea...
true
f06fcc48e573a40db95e4a65de8549fc5eb7553d
JavaScript
jarcik/flight-search-js
/src/Search/Autocomplete.js
UTF-8
2,980
2.8125
3
[]
no_license
import React, { Component } from 'react'; import './Autocomplete.css'; class Autocomplete extends Component { constructor(props) { super(props); //handling changes on input field this.handleInputChange = this.handleInputChange.bind(this); //selecting autocomplete item th...
true
d13091ff5b88a3fdcf7ef8b408b449da52f18b8c
JavaScript
Bryconc/CaptionMyImage
/js/mainpage.js
UTF-8
4,348
3.109375
3
[]
no_license
function buildMainPage() { var table = document.createElement("TABLE"); var photoOffset = getOffset(); getImageData(photoOffset, table); getCommentData(); createPageSelector(); $("#recentImages").append(table); } function addMostRecentImages(ids, table) { var imgCounter = 0; var imgMax...
true
d22c8c597e9c399575a353401738c0343456c3e7
JavaScript
MaximNeporada/601999-cinemaddict-11
/src/components/films-card.js
UTF-8
3,474
3.03125
3
[]
no_license
import {AbstractComponent} from "./abstract-component"; import {formatRunTime, getRandomArrayItem} from "../utils/common"; import moment from "moment"; import {MAX_CARD_DESCRIPTION_LENGTH, CONTROL_BUTTON} from "./../const"; // получаем обрезанную строку если строка > MAX_CARD_DESCRIPTION_LENGTH const getShortDescripti...
true
b60909816b526ade13e3f8587aa7d816ee76d748
JavaScript
leo14s/codewars
/validSudoku.js
UTF-8
829
4.25
4
[]
no_license
/** * Write a function validSolution/ValidateSolution/valid_solution() that accepts * a 2D array representing a Sudoku board, and returns true if it is a valid * solution, or false otherwise. The cells of the sudoku board may also contain * 0's, which will represent empty cells. Boards containing one or more zeroes...
true
886c26b61df95016a8bf77f7f7b48a4b309e8129
JavaScript
mranosa/minesweeper
/app/scripts/services/Grid.js
UTF-8
2,641
3.125
3
[]
no_license
'use strict'; angular.module('minesweeperApp') .factory('Grid', function (Point) { var Grid = function(xSize, ySize) { this.xSize = xSize; this.ySize = ySize; this.lines = []; for (var x = 0; x < xSize; x++) { var line = []; for (var y = 0; y < ySize; y++) { lin...
true
347a4a24ecab8a646f49f02d48f3c6357c41f799
JavaScript
beefsalad/SouthwestCheckin
/frontend/src/utils/validate.js
UTF-8
1,937
3.21875
3
[]
no_license
/* Validation util helper that checks form validation elements with the given name and value of input element. Returns back any errors messages to use in the components. */ const validate = (name, value) => { switch (name) { case 'confirmation': if (value === '') { return { error: tr...
true
6158fc8e776255177b516ffe5d6fa05932d15c8c
JavaScript
mranido/ojeador
/frontend/my-app/src/utils/getAge.js
UTF-8
282
3.125
3
[]
no_license
export const getAge = (birthday) => { const birthDate = new Date(birthday); const difference = Date.now() - birthDate.getTime(); const age = new Date(difference); if (!birthday) { return "...Cargando"; } else { return Math.abs(age.getUTCFullYear() - 1970); } };
true
f90bba2d6f4c9f6bcd130b3cf192ed2591c35338
JavaScript
aayush1408/Weather-graph-react
/src/component/TempDisplay.js
UTF-8
451
2.5625
3
[]
no_license
import React from 'react'; const TempDisplay = ({ data, name }) => { const tempData = data.map((item, key) => <li key={key} className="list-group-item">{item}</li>) return ( <div style={{ padding: '20px', textAlign: 'center' }}> <h4>Next 5 days temperatures of {name} in K</h4> <ul style={{ padding:...
true
7ddcb34b43d7e09687ab44fbafa05ae1caf777be
JavaScript
qiushihe/nextjs-playground
/pages/api/hello.js
UTF-8
368
2.671875
3
[]
no_license
// You should not fetch an API Route from getStaticProps or getStaticPaths. Instead, write your // server-side code directly in getStaticProps or getStaticPaths (or call a helper function). // The reason being getStaticProps or getStaticPaths only run on server side. const handler = (req, res) => { res.status(200).js...
true
50de9e376232ff80abfa948eb4c921a942401a6a
JavaScript
Sangram8897/GYMC
/src/containers/home_/subject_list/TimeInput.js
UTF-8
3,373
2.703125
3
[]
no_license
import React, { Component } from 'react' import { Text, View, TextInput, StyleSheet } from 'react-native' export default class TimeInput extends Component { constructor(props) { super(props) this.state = { hh: this.props.hh, mm: this.props.mm, ss: this.props.s...
true
0914b08cd061630d7fe31a2d22e7a07325ccf636
JavaScript
okrysiuk/time-tracker-react
/src/components/input/input.js
UTF-8
1,098
2.546875
3
[]
no_license
import React, { useState } from "react"; import "../app/app.css"; import * as FaIcons from "react-icons/fa"; import firebase from "../../util/firebase.js"; const Input = () => { const [title, setTitle] = useState( `Track ${new Date().getDate()}/${new Date().getMonth()}/${new Date().getFullYear()} ` ); const ...
true
6ca6d8cbfa84eebb838d50100ee23afd43a5ca09
JavaScript
onure9e/ticketTool
/src/util/Util.js
UTF-8
254
2.953125
3
[ "MIT" ]
permissive
class Util { static randomRange(min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; } static arrRandom(arr){ var sonuc = arr[Math.floor(Math.random() * (arr.length))] return `${sonuc}` } } module.exports = Util;
true
2a76d8f46f56cbc8c29417f8752f90c2ae306726
JavaScript
jthantranon/metafoliodata
/test.js
UTF-8
1,428
2.796875
3
[]
no_license
// let go = '', // fly = '2w', // a = 'r2', // kite = 'as'; // // let array = [go,fly,a,kite]; // // // console.log(array.toString()) // let out = ''; // console.log(); // let astring = `[go,fly,a,kite];`; // out = eval(astring); // console.log(out); const Axios = require('axios'); const r...
true
811c226466de926366f96017625a4cd9ef7eb6a7
JavaScript
anthonybalmeo/StickyNote
/src/app/js/DeviceManager.js
UTF-8
4,565
3.109375
3
[]
no_license
/** * Determines what kind of device is being used by the user. * Sets up the environment for the appropriate device. * */ function DeviceManager() { this.deviceName= navigator.userAgent; if(this.isiOS()) { this.device=Device.iOS; }else if(this.isAndroid()) { this.device=Device.ANDROID; }else {...
true
8232baea88b4eb5299bcadd8f2424c4ea6663f01
JavaScript
rebeccaleach/hangman2
/game.js
UTF-8
576
3.671875
4
[]
no_license
// randomly selects a word var wordsArray; var wordSelection; var lettersArray; function generateWordToGuess() { wordsArray = ['malinda', 'rebecca', 'brian', 'kristin', 'nora', 'olive', 'margo', 'luca', 'jace', 'godric', 'scott', 'justine', 'audrey', 'deanna', 'kate', 'helen', 'henry', 'christopher', 'liz', 'raymon...
true
345ff3856e037f7d9b10f2a2ad371d939b42f76c
JavaScript
RarexWU16/LanParty
/LanParty.Web/Scripts/map.js
UTF-8
4,141
3.3125
3
[ "MIT" ]
permissive
$(function () { // Canvas ------------------------- var canvas = document.getElementById("canvas"); var ctx = canvas.getContext("2d"); var canvasOffset = $(canvas).offset(); var offsetX = canvasOffset.left; var offsetY = canvasOffset.top; var canvasWidth = canvas.width; var canvasHeigh...
true
026ae5fedfefa984beb9476f39bd18239718476c
JavaScript
Eren397/tooltip
/script.js
UTF-8
1,185
3.03125
3
[]
no_license
const tooltips = document.querySelectorAll('.map img') const spanY = document.querySelector('.y') const spanX = document.querySelector('.x') tooltips.forEach(tool => { tool.addEventListener('mouseover', onMouseOver) }) function onMouseOver(){ let tooltip = createBox(this) this.addEventListener('mousemove'...
true
c5d9b31911a55aba18860181b0e713921551fddd
JavaScript
vandeo/js-study
/study_1/js/index.js
UTF-8
257
3.640625
4
[]
no_license
var myObject = function() { var obj = {}; obj.name = "Alex"; obj.age = 29; obj.email = "alex@gmail.com"; obj.address = "HCM City"; obj.showName = function(){ return this.name; } return obj; } var obj1 = new myObject(); console.log(obj1.showName());
true
4dad58372473b03d42d07cb1bd50774f8876efec
JavaScript
Board-Engine/board_engine
/seeds/app.js
UTF-8
2,141
2.765625
3
[ "WTFPL" ]
permissive
const faker = require('faker'); const Board = require('../models/Board'); const Thread = require('../models/Thread'); const Post = require('../models/Post'); const User = require('../models/User'); const argon2 = require('argon2'); const crypto = require('crypto'); async function CollectionUsersSeeder() { let use...
true
57329d950455c684ec0848e3bea1b1c99d9ae442
JavaScript
luucasbarbosa2/evenker_new
/webroot/src/Dwoo/AjaxController.js
UTF-8
883
2.703125
3
[]
no_license
(function( $ ){ $.fn.ajaxView = function(options) { var defaults = { 'url' : $(this).attr('data-url'), 'methodType': 'POST', 'dataType': 'JSON', 'dataValues': {value: $(this).attr('data-value')} }; var settings = $.extend( {}, defaults, optio...
true
824905436455fa5d73d80eb29bf372bb3f48ca6a
JavaScript
weisk/nodetube
/lib/livestreaming/postNewRecordings.js
UTF-8
3,042
2.53125
3
[ "MIT" ]
permissive
const request = require('request'); const fs = require('fs-extra'); const mongoose = require('mongoose'); const Upload = require('../../models/index.js').Upload; const mongoUri = process.env.MONGO_URI; // /** // * Connect to MongoDB. // */ // mongoose.Promise = global.Promise; // // mongoose.Promise = global.Promi...
true
bfb38f41a1646d1dbbf49b3efa337c21c7954503
JavaScript
rickvillafane/CursoIngresoJS
/8-TPs/03-jsFerretePinturas.js
UTF-8
1,046
4.03125
4
[]
no_license
/* AUTOR: VILLAFAÑE RICARDO ENUNCIADO: TP N3 3. Para el departamento de Pinturas: A. Al ingresar una temperatura en Fahrenheit debemos mostrar la temperatura en Centígrados con un mensaje concatenado (ej.: " 32 Fahrenheit son 0 centígrados"). B. Al ingresar una temperatura en Centígrados debemos mostrar la temperatur...
true
87d5bae381bb09af9b0d6f8b2d40a46f068c8550
JavaScript
kowhai-2018/fishlist
/tests/client/components/Fishlist.test.js
UTF-8
1,357
2.765625
3
[]
no_license
import {orderHighThreat, orderLowThreat, orderMethod} from '../../../client/actions/fish' import {sortingAZ, sortingZA} from '../../../client/components/FishList' test('orderHighThreat returns an action with a type', () => { const expected = 'SORT_HIGH_THREAT' const actual = orderHighThreat('HIGHTHREAT').type ex...
true
db3d26fbf23ce6f610a22428c9cfc09885eaaabf
JavaScript
marufsiddiqui/react-flip-move
/src/prop-converter.js
UTF-8
2,857
2.9375
3
[ "MIT" ]
permissive
/** * React Flip Move | propConverter * (c) 2016-present Joshua Comeau * * Abstracted away a bunch of the messy business with props. * - propTypes and defaultProps * - Type conversion (We accept 'string' and 'number' values for duration, * delay, and other fields, but we actually need them to be ints.) ...
true
c85e18b67ba211ba6e9832b60b75ca4a183ce0f8
JavaScript
synaptiko/mnml-tmpl
/lib/HtmlMountPoint.js
UTF-8
2,135
3
3
[]
no_license
function HtmlMountPoint(key, type, startNode, endNode) { this.key = key; this.type = type; this.startNode = startNode; this.endNode = endNode; this.parentNode = startNode.parentNode; } HtmlMountPoint.prototype.update = function(key, value) { // TODO assert key === this.key this.value = value; }; HtmlMountPoint...
true
5ce1b274fb4ad299985077ffe6232e98dd798a6d
JavaScript
dmkite/costume-api
/controllers/tags.js
UTF-8
1,679
2.65625
3
[]
no_license
const model = require('../models/tags') const {getOneCostume} = require('../models/costumes') function getAllTags(req, res, next) { const { correctCostume } = req.body let tagList = model.getAllTags(correctCostume) res.status(200).send(tagList) } function getOneTag(req, res, next) { const correctCostu...
true
43a065223f96bff442d99674d4d37563cbd8d722
JavaScript
cusmith/dronedelivery
/app/static/app/map.js
UTF-8
1,768
2.59375
3
[]
no_license
var map = null; var markers = []; function initalizeMap() { map = new google.maps.Map(document.getElementById('map'),{ backgroundColor: '#ffffff', mapTypeId: 'terrain', mapTypeControl: false, streetViewControl: false, center: {lat: 48.427580, lng: -123.364456}, scrollwheel: true, zoom: 12, styles: [ ...
true
c190580ae9953b2ed4f17685752b809bfd2240de
JavaScript
Maximalxx/homeworkJS
/Module 1/Practice2/JS/task1.js
UTF-8
92
2.515625
3
[]
no_license
'use strict' const userName = prompt('Ведите ваше имя'); console.log(userName)
true
4c3b9e0757903cbb9d585e055b8c859576eb8a05
JavaScript
Jpinka/backend-spring2020-jessica
/practice/week3/firstNode/firstNodeProject/index.js
UTF-8
1,165
3.625
4
[]
no_license
// npm install -g package_name // This installs the package globally, meaning to your computer, so that any other project can use it. Downside: It is only on your computer and not "required" by your package. // npm install -S package_name // This installed the package just for the Node project you are in. This will a...
true
a50bdd21eeb962d3afa05c73bd1a6cebfa19fcdd
JavaScript
ambacc244/algorithm
/JavaScript/level2/카펫.js
UTF-8
253
3.109375
3
[]
no_license
function solution(brown, yellow) { var answer = []; for(let i=1; i<=yellow; i++) if(Number.isInteger(yellow/i)) if(2*i + 2*(yellow/i) + 4 === brown) return [yellow/i+2, i+2]; return answer; }
true
2366ab2e7c40a590909f692e74b563ab34c9fe27
JavaScript
Yash202000/react
/src/Hooks/Sample.js
UTF-8
480
2.703125
3
[]
no_license
import React,{useState} from 'react' function Sample(){ //const[count,setCount]=useState(10); const[count1,setCount1]=useState(10) const[count2,setCount2]=useState(12) return( <div> <button onClick={()=>{ setCount1(currentCount=>currentCount+1); setCount2(currentCount=>c...
true
528cd454fe03b0bb1b6f20cb390f6b8cb02399a6
JavaScript
bbelovic/js-playground
/json-examples.js
UTF-8
349
3.375
3
[]
no_license
var json = '[{"name":"john", "surname":"doe"},{"name":"jane", "surname":"doe"}]' var people = JSON.parse(json); console.log(people.length); console.log(people[0].name) var itemsJson = '[{"name":"item 1","finished":true},{"name":"item2","finished":false}]' var items = JSON.parse(itemsJson) console.log(items[0].name); c...
true
9672375499b808ac4a406baa7f384157335c84c4
JavaScript
erickAlva21/JavaScript
/funciones.js
UTF-8
451
3.765625
4
[]
no_license
function suma(num1, num2) { resultado = num1 + num2; console.log(resultado) } function cantidades() { var client = [] client[0] = prompt('Ingrese una cantidad'); client[1] = prompt('Ingresa una cantidad'); client[2] = prompt('Ingresa una cantidad'); client.sort() // Sort ordena los datos de...
true
c2313aa0d7af8d56e4f62037bdfb9e203e2b906d
JavaScript
shipinkarmali/skwd9-03-basicjs
/G6/Class09/Code_From_Class/Objects/script.js
UTF-8
2,915
4.53125
5
[ "MIT" ]
permissive
let hotelName = "Aleksandar Palas"; let hotelRooms = 100; let hotelAvailableRooms = 45; let hasPool = true; function bookRoom() { hotelAvailableRooms = hotelAvailableRooms - 1; } // Creating Object Using Literal Notation // let hotel = {} => new Object() let hotel = { name: "Aleksandar Palas", rooms: 100,...
true
514bcaad221ce8d4839db9aacb7eaf3990fed34d
JavaScript
egorcko/JS
/Lesson 2/js/main.js
UTF-8
1,646
3.65625
4
[]
no_license
let time = 15; let i = 0; let mainList = { budget: +prompt('Ваш бюджет?'), name: prompt('Название Вашего магазина?'), shopGoods: [], employers: {}, isOpen: true } let budget = mainList.budget; let shopGoods = mainList.shopGoods; for (i = 0; i <= 2; i++) { let a = prompt('Какой тип товаров будем продавать?'); ...
true