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
76fd329be2b0e143e0fb9e6a92ffd1cc568c006e
JavaScript
lewis-ulster/UX-BackEnd
/routes/product.js
UTF-8
1,648
2.640625
3
[]
no_license
const express = require('express'); const router = express.Router(); const Product = require('../schema/Product'); //GET REQUEST HANDLER router.get('/' , async (req, res) => { try{ const products = await Product.find(); res.json(products).status(200) } catch (err) { res.json({ messa...
true
1d0ef5e222a775160b6fa2c8a45e7048933040c7
JavaScript
anamwp/serverless-functions
/functions/load-flower.js
UTF-8
1,295
2.78125
3
[]
no_license
const fetch = require('node-fetch'); exports.handler = async () => { const corgis = await fetch("https://no-cors-api.netlify.app/api/corgis/") .then( res => res.json() ); const fetchSingleImage = async id => { var singleImgUrl = await fetch(`https://api.unsplash.com/photos/${id}`, { ...
true
15de108d93fde99cebc32fa2c1caf286805f3bd6
JavaScript
maximusnikulin/test-alpha
/public/main.js
UTF-8
3,204
2.796875
3
[]
no_license
const Home = { template: `<div>Главная Страница</div>` } const Top = { template: ` <div> <table> <thead> <tr> <th>Rate</th> <th>Name</th> <th>Status</th> <th>Exp</th> <th>Money</th> </tr> <thead/> ...
true
9efb90ac6bdde94a32b1341c2847268bb39cc50a
JavaScript
jojo3420/m-player-app
/web-v1/src/lib/util.js
UTF-8
685
2.953125
3
[]
no_license
// import { round } from 'mathjs' // simplify /** * calculate audio duration for human time format * @param seconds * @return {{s: number, h: number, m: number}} */ export function calcAudioDuration(seconds, format) { let h = Math.floor(seconds / 3600) let m = Math.floor((seconds % 3600) / 60) let s = Math.c...
true
de4a69228cbe2d6559a9bae8a2d727fee1c63daf
JavaScript
RyanHarrisFL/TriviaGame
/assets/javascript/app.js
UTF-8
4,653
3.125
3
[]
no_license
// setting my global variables var countDown = 60; var correctAnswers = []; var wrongAnswers = 8 var intervalId; //setting up buttons, timer and results display $("#start").on("click", startGame); $("#done").on("click", results); $('#restart').click(function () { location.reload(true); }); $("#countdown").html(...
true
06ffde2329fa009c0f10847b21dbbf912eaa5e14
JavaScript
Sarith1/Country-info-app
/nodeapp.js
UTF-8
345
2.65625
3
[]
no_license
var countryname = process.argv[2] var filereader = require ('./json-file-reader.js') filereader.parseJSON ('./countries.json', function (jsondata){ jsondata.forEach (function (country){ if (country.name == countryname){ console.log ("Country:" + country.name) console.log ("Top Level Domain: " + country.topLev...
true
460165d5962c6480765f3414899e8e23dbc8d359
JavaScript
diop/core-data-structures
/src/double_node.js
UTF-8
1,308
3.359375
3
[ "MIT" ]
permissive
'use strict'; /* Class declaration for DoubleNode and export statement making that object the default export from this module. */ export default class DoubleNode { constructor(nodeProps) { // If the argument is valid: if ( nodeProps !== undefined && nodeProps.data !== undefined && ( ...
true
d164c43e2240d47ce36d17dcc38c8d398d42d84d
JavaScript
danielramosITD/html5
/Exercise/Charter 9/js/main.js
UTF-8
1,027
3.375
3
[]
no_license
// document.getElementsByTagName("p")[0].innerHTML ='number 1'; // document.getElementsByTagName("p")[1].innerHTML ='number 2'; // document.getElementsByTagName("p")[2].innerHTML ='number 3'; // document.getElementsByTagName("p")[3].innerHTML ='number 4'; // document.getElementsByTagName("p")[4].innerHTML ='number 5'; ...
true
80a22553468f37f6b9d1742d881ee89d5f68443b
JavaScript
edanlheureux/MajorProject.github.io
/p5/OregonTrail.js
UTF-8
32,712
2.53125
3
[]
no_license
// Oregon Trail // Edan L'Heureux // --/--/2019 //////////////////////////////////////////////////////////////////////////////// let x = 1300; let state; let food = 2000; let clothes=20; let wagonis; let nxtlndmrk=150; let weather=1; let health=100; let totalmiles=0; let date=0; let theshits; let music,music1,music2...
true
2c56fa9608aa0d224d0867e0a5405e2538c71854
JavaScript
FredrikHj/mandatory-advanced-js2
/src/editPage.js
UTF-8
8,077
2.796875
3
[]
no_license
import React, { Component } from 'react'; import axios from 'axios'; import './movieapi.css'; import {Helmet} from "react-helmet"; // React Router - ES6 modules import { BrowserRouter as Router, Route, Link , Redirect} from "react-router-dom"; class EditPage extends Component { constructor(props) { super(props)...
true
ec25bb90f7d6e5d9aa042f9084ec6ec57df45d9a
JavaScript
jayfresh/contributively
/contributively_backup.js
UTF-8
655
2.5625
3
[]
no_license
/* appjet:version 0.1 */ import('storage'); if (!storage.names) { storage.names = new StorableCollection(); } function post_main() { var name = request.params.name; if(name) { storage.names.add({ name:name, position:storage.names.size()+1; }); response.write...
true
f9cdccc7075677df766d9d092a582c532bf5f44d
JavaScript
eladolo/Twitch-PHP-Overlay
/js/libs/jwt.js
UTF-8
1,807
2.765625
3
[ "MIT" ]
permissive
window.base64urlEncode = function(source){ // Encode in classical base64 encodedSource = CryptoJS.enc.Base64.stringify(source); // Remove padding equal characters encodedSource = encodedSource.replace(/=+$/, ''); // Replace characters according to base64url specifications encodedSource = enco...
true
15b1789d0afe6589001677d35f01c0ab3cb838c5
JavaScript
kayartaya-vinod/2018_11_PHILIPS_ANGULAR
/webpack-demo/app/main.js
UTF-8
214
2.53125
3
[]
no_license
const one = require('./one'); const two = require('./two'); import { Person } from './four'; const p1 = new Person('Vinod', 45); p1.print(); p1.name = 123; console.log('one()', one()) console.log('two()', two())
true
50f8b266d0977ad65402d887d9cf9d2f84c61cdc
JavaScript
guedesantonio/Restaurant-Tables-App
/server.js
UTF-8
1,196
3.234375
3
[]
no_license
// * Create a basic server using Express.JS const express = require("express"); const path = require("path"); const app = express(); const PORT = 3000; app.use(express.urlencoded({ extended: true })); app.use(express.json()); // * Create a few array variables that will hold the data const tables = [ { n...
true
ee68ac4e807c4b0f6825b4b4b3b29c031e03c4ea
JavaScript
movibe/react-native-jokenpo
/index.ios.js
UTF-8
3,990
2.578125
3
[]
no_license
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View, Alert, TouchableHighlight, Image, } from 'react-native' import Topo from './topo'; import Icone from './icone'; class Project...
true
3f5b2496520215760bae5ddff9ca465be6efae58
JavaScript
Pinto18/translationExchange
/src/js/reducers/DirectionReducer.js
UTF-8
410
2.515625
3
[]
no_license
import { UPDATE_DIRECTION } from '../actions/types'; const INITIAL_STATE = { direction: "ltr" }; export default (state = INITIAL_STATE, action) => { switch (action.type){ case UPDATE_DIRECTION: return { state, direction: action.updateDi...
true
14ef80cefa0393a8c9138631bb0b62b1cd8072b3
JavaScript
guiassemany/reactnd-project-myreads-starter
/src/App.js
UTF-8
4,165
2.671875
3
[]
no_license
import React, {Component} from 'react' import * as BooksAPI from './BooksAPI' import {Route} from 'react-router-dom' import './App.css' import BookList from './Components/BookList' import BookSearch from './Components/BookSearch' import sortBy from 'sort-by' import BookDetails from "./Components/BookDetails" class Boo...
true
0183a16dfb4c702937c25673c40bdf41cf8d1c4a
JavaScript
Shiref-Abouzaid/MDBT
/store/vendors.js
UTF-8
461
2.609375
3
[]
no_license
// export default { export const state = () => ({ vendors: [] }); export const getters = { vendors(state) { return state.vendors; } }; export const mutations = { setVendors(state, vendorsData) { for (let vendor of vendorsData) { let vendorObject = { id: vendor.id, imageUrl: vend...
true
26e132aa390dcbd720796d21e2d879fdba9dde53
JavaScript
sechae0528/Dev
/work/server1/guestbook/test/test1.js
UTF-8
495
2.671875
3
[]
no_license
// test1.js var mysql = require('mysql');//heidisql 실행(로드) var connection = mysql.createConnection({ host: 'localhost', user: 'root', password: '1234', database: 'mobiledb' });//준비단계 connection.connect();//연결 connection.query('SELECT 1 + 1 AS solution', function(error, results){ if(error) throw error; console...
true
61c75f1032a7e02fd8be45b6b8e933771cabddca
JavaScript
KhalidOuali/LandingPage
/main.js
UTF-8
3,459
2.96875
3
[]
no_license
"use strict"; const time = document.getElementById("time"), greeting = document.getElementById("greeting"), name = document.getElementById("name"), focus = document.getElementById("focus"), tagline = document.getElementById("tagline"), teamVerte = ["Teresa", "Romane", "Hendrick", "Reda", "Khalid"], randomH...
true
cc728559c569a5a30356e0c410d644109ef6eeec
JavaScript
artman-training-projects/htmlacademy-nerds-26
/js/contact-us.js
UTF-8
2,254
2.90625
3
[]
no_license
var contactShow = document.querySelector('.contacts__link'); var formContacts = document.querySelector('.form-contacts'); var btnSubmit = formContacts.querySelector('.form-contacts__submit'); var btnClose = formContacts.querySelector('.form-contacts__close') var contactName = formContacts.querySelector('#form-name'); ...
true
c826faaf922ae0b9d73ed274e4e4020833b31eae
JavaScript
WhyNot1231/ARRAYS_QUIZ_GAME
/embellish.js
UTF-8
980
3.953125
4
[]
no_license
let userAns=[]; let corAns=[]; let numCor=0; let createQuestion=function(questionText, choice1, choice2, choice3, choice4, correctChoice){ userAns.push(prompt(questionText + "\nYour choices are: \n" + " A: " + choice1 + " B: " + choice2 + " C: " + choice3 + " D: " + choice4)); corAns.push(correctChoice); }; ...
true
480ddf6fb69d827c81ddb0275726bd9c668ef972
JavaScript
arsh9295/kumarbuilding
/static/jss/multi.js
UTF-8
1,422
2.78125
3
[ "MIT" ]
permissive
var textboxvalue; function textboxid(clickedid) { alert(clickedid) //alert($(self).attr('id')); } function multi(clickedid){ var rate = document.getElementById(clickedid).value var quan = document.getElementById(clickedid+"q").value if(document.getElementById(clickedid+"i").value == "sel...
true
5fc05c935e2049ec8ff135086621715583a05b6a
JavaScript
ChefAndy/Chronolawgic
/server/server.js
UTF-8
4,258
2.640625
3
[ "MIT" ]
permissive
const express = require('express') const cors = require('cors') const app = express() const port = 3000; // TODO — Set up database backend // TODO — Set up authentication backend // TODO — Write Logic: /timeline // TODO — Write Logic: /timeline/:id // TODO — Write Logic: Set /user // TODO — Write Logic: Set /user/:id ...
true
a73c12cd8b3cc2fe4605d9351bba0df8ac1eab96
JavaScript
sarcastic-verma/Book-Fruits
/controllers/book-controller.js
UTF-8
1,819
2.640625
3
[]
no_license
const {validationResult} = require('express-validator'); const RequestError = require('../middleware/request-error'); const Book = require('../models/book'); const getBookById = async (req, res, next) => { const bookId = req.params.bookId; let book; try { book = await Book.findById(bookId); } c...
true
1ee6a469de00e744d655173011af4546c4aa04b4
JavaScript
cly168/CD_algorithms
/24_poor_kenny.js
UTF-8
327
2.984375
3
[]
no_license
function whatHappensToday(){ var outcome = Math.floor(Math.random()*100+1); if(outcome<=10){ console.log('volcano'); } else if(outcome<=25){ console.log('tsunami'); } else if(outcome<=45){ console.log('earthquake'); } else if(outcome<=70){ console.log('blizzard'); } else{ console.log('meteor strike'...
true
13601a04c769bfa1074e6674caee59a119a0b35f
JavaScript
aldomendez/miniature-octo-nemesis
/public/js/main.js
UTF-8
1,455
2.640625
3
[]
no_license
(function() { var ProgressBar, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; ProgressBar = (function() { function ProgressBar() { this.tick = __bind(this.tick, this); this.percent = 0; } ProgressBar.prototype.start = function() { var program;...
true
c64c4466a2dc130f451ccffcd07ee7476bf1258b
JavaScript
WestonDease/homework-07
/api-routes.js
UTF-8
4,529
2.984375
3
[]
no_license
// =============================================================================== // LOAD DATA // We are linking our routes to a series of "data" sources. // These data sources hold arrays of information on table-data, waitinglist, etc. // ===========================================================================...
true
eda6aaf99adec6ae1ef32f9f7d3fcab8f598bdd1
JavaScript
vincenterc/the-nature-of-code-p5js
/ch02-forces/2-03-forces-many-real-gravity/sketch.js
UTF-8
440
2.96875
3
[]
no_license
let movers = []; function setup() { createCanvas(640, 360); movers = Array(20) .fill("") .map(() => new Mover(random(0.1, 5), 0, 0)); } function draw() { background(255); let wind = createVector(0.01, 0); movers.forEach(mover => { let gravity = createVector(0, 0.1 * mover.mass); mover.ap...
true
a5a767732224a199503a6f2498247af9bdbf590f
JavaScript
tmentink/sliding_puzzle
/src/js/macro/search/search--core.js
UTF-8
1,786
2.984375
3
[]
no_license
// =========================================== // Search - Core // =========================================== var search = (function(search) { "use strict"; // Execute Search // ======================================= var executeSearch = function() { if (!puzzle.isReady || puzzle.isAnimating...
true
158733246f22a4c13066d1b1a4012cfab66e90d5
JavaScript
JuneWhite/shoppingmart
/src/function/index.js
UTF-8
2,890
2.515625
3
[]
no_license
import axios from '@/http' // 获取子项id const getChildrenId=(arr,data)=>{ for(let i in data){ arr.push(data[i].id) if(data[i].children){ getChildrenId(arr,data[i].children) } } } export const getIds= (id,data)=>{ let idArr=[] for(let i in data){ if(id==data[i].id){ getChildrenId(idArr...
true
40ef7237196372f10b80ca3d8cb9c8ca9925d49e
JavaScript
juarezpaulino/coderemite
/problemsets/Codeforces/Javascript/A1374.js
UTF-8
254
3.015625
3
[ "Apache-2.0" ]
permissive
/** * * Author: Juarez Paulino(coderemite) * Email: juarez.paulino@gmail.com * */ var t = readline(); while (t--) { var a = readline().split(' ').map(Number); var x = a[0], y = a[1], n = a[2]; var m = Math.floor(n / x) * x; print(m + y > n ? m - (x - y) : m + y); }
true
8ab9dd38246a7bc603b1091f98dbb1012221a7ea
JavaScript
ivipul/lyriculaize
/js/script_working.js
UTF-8
2,255
2.921875
3
[]
no_license
var w = 820; var h = 560; var alphabets = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]; d3.json("data/sample_data.json", init); function init(json){ console.log(json); var xScale=d3.scale.ordinal() .domain(alphabets) .rangeBands([0,780]); var yS...
true
ab2c6835da5cda015f89560209bd4f6e19365775
JavaScript
ceffo/minesweeper
/MinesweeperTests.js
UTF-8
21,004
3.28125
3
[]
no_license
var board; function assertBoard(assert, board, height, width, expectedBombs) { assert.strictEqual(board.height, height, "height"); assert.strictEqual(board.width, width, "width"); assert.strictEqual(board.bombCount, expectedBombs, "bombCount"); } function assertBombs(assert, board, expectedBombs) { v...
true
e9ae1f03eafa5adf31c726a94a8d66fd15fbd7d9
JavaScript
devpuppet/algos-and-data-structures
/src/data_structures/stack/Stack.js
UTF-8
837
3.28125
3
[]
no_license
const Node = require('./Node').Node; module.exports.Stack = class Stack { constructor() { this.first = null; this.last = null; this.length = 0; } push(value) { const node = new Node(value); if (!this.first) { this.first = node; this.last = no...
true
f03f1942bff2dc4438e826563c77f3c50dc5820f
JavaScript
awanga123/GameOfLife
/public/timer.js
UTF-8
582
2.578125
3
[]
no_license
import * as actions from './actions' let interval = null let store = null /** * Run the app by setting the interval if there is one */ const run = () => { if (!interval) { interval = setInterval(() => { store.dispatch(actions.step()) }, 1) } } /** * If an interval exists, clear the interval and ...
true
20aa9a622a5b3b60d5d5a859b888fddc8418614d
JavaScript
taurheim/savas.ca
/includes/projects.js
UTF-8
7,067
2.671875
3
[]
no_license
//Store all JSON here as it gets loaded var json_data = {}; var imageView = new NikoImageView(); window.onload = function() { // Data to load: will try to load {root}/{type}.json into json_data[{type}] var projectDataRoot = "project_data"; var projectDataTypes = [ "project_info", "collaborators", "li...
true
76b9fdcc047da6c0f98c8bd650ff887e19db1aa5
JavaScript
lengyue1024/notes
/JavaSript/javascript-obj-XMLHttpRequest.js
GB18030
4,945
3.171875
3
[]
no_license
--------------------------- XMLHttpRequest | --------------------------- # function createXMLHttpRequest(){ try{ // return new XMLHttpRequest(); }catch(e){ try{ return new ActiveXObject("Msxml2.XMLHTTP");//IE6.0 }catch(e){ try{ return new ActiveXObject("Microsoft.XM...
true
61ceb59757df19f14a2a111755a5fb833beb16a8
JavaScript
miguelgrinberg/python-engineio
/examples/client/javascript/latency_client.js
UTF-8
419
2.734375
3
[ "MIT" ]
permissive
const io = require('engine.io-client') const port = process.env.PORT || 5000; const socket = io('http://localhost:' + port); let last; function send () { last = new Date(); socket.send('ping'); } socket.on('open', () => { send(); }); socket.on('close', () => { }); socket.on('message', () => { const latency ...
true
20b2cf73c30e1a179a2b620fc654ca1d2688321f
JavaScript
zouppa/cloud-compare
/AWS/JS/PrimeList.js
UTF-8
458
2.703125
3
[]
no_license
exports.handler = async (event) => { var store = [], i, j, primes = []; for (i = 2; i <= event.max; ++i) { if (!store [i]) { primes.push(i); for (j = i << 1; j <= event.max; j += i) { store[j] = true; } }...
true
f8b7edc264356402d00effc425b49680d22d9d95
JavaScript
Squishy123/roids
/src/engine/lib/physicsActor.js
UTF-8
1,472
3.03125
3
[ "MIT" ]
permissive
import Actor from '../lib/actor'; export default class PhysicsActor extends Actor { constructor(ctx, bounds) { super(ctx); this.px = bounds.px | 0; this.py = bounds.py | 0; this.width = bounds.width | 0; this.height = bounds.height; //angle relative origin t...
true
05c30c30fdd545dffc83c0b198fe43dc134c3a45
JavaScript
J3SS13/hey-girl
/hey-girl-app/client/src/components/services/auth.js
UTF-8
541
2.640625
3
[]
no_license
//register, login(store in local storage), logout(delete from local storage) //get user name age get token, set token //jwt decode - npm install , Loggen boolean in state // set item in local storage: localStorage.setItem("jwt", value) localStorage.removeItem("jwt") //getItem to retrieve token import axios from ...
true
a29eb559f207dc2805b6f0bfd45078c0e50136ee
JavaScript
broken1451/JsModerno
/01FundamentosJs/assets/js/classes/class.js
UTF-8
487
3.421875
3
[]
no_license
class Persona { nombre = ''; codigo = ''; frase = ''; comida = ''; // constructor(nombre='dsdsd', codigo='151', frase='dadasas') { constructor(nombre, codigo, frase) { // console.log('HOLA'); this.nombre = nombre; this.codigo = codigo; this.frase = frase; } } ...
true
406dcb09dc21f9affadc0b8242d0a5bb1c14f18e
JavaScript
SkySor44/car-clone
/car-clone/src/Home/Home.js
UTF-8
2,021
2.546875
3
[]
no_license
import React, { Component } from 'react'; import FirstTimeIntro from './1stTimeIntro'; import SevenEighteenIntro from './718Intro'; import NineElevenIntro from './911Intro'; import AutoSlider from './AutoSlider'; import DrPorsche from './DrPorsche'; import ManualSlider from './ManualSlider'; import {Throttle} from 'r...
true
48e333ef1fa8a4ceb55e9daf2422f0510ae34ed1
JavaScript
chloe-codes1/vanilla-js
/live/ES/arrayHelperMethods.js
UTF-8
1,231
4.5
4
[]
no_license
// node [file 명] 으로 실행 global.console.log('ha') // forEach // const urls = ['https://...', 'www...', 'http://...'] // urls.forEach( url => { // axios.get(url) // .then() // .catch() // }) // map const arr = [1,2,3] const newArr = arr.map(num => num+1) // 풀버전 ... 이지만 arrow 가 간단하므로 arrow 쓸꺼얏 arr...
true
e617d258a0b902d34aeaa4c90652c6422416c300
JavaScript
nabeel6223/node-weather
/public/js/clrgame.js
UTF-8
2,412
3.125
3
[]
no_license
var sq=document.querySelectorAll(".square"); var but2=document.querySelector(".but2"); var but1=document.querySelector(".but1"); var but3=document.querySelector(".but3"); var res=document.querySelector(".result"); var colors; var level=6; but3.classList.add("selected"); var h=document.querySelector(".headline"); var co...
true
706b98ca05b29ffbd03baff770e35d04cf4e729d
JavaScript
thirdslipper/JenkinsBuild
/week4master/JavaScriptExample/js/home.js
UTF-8
117
2.78125
3
[]
no_license
// line comments /* block */ var a = "3"; for(var i = 0; i<=a; i++) { console.log(i); console.log(i==a); }
true
67ea53256e5a5b2a4c426b749ca04cc2a445a019
JavaScript
BadilloDeveloper/WebApps
/Tema2/Ejercicio6/index.js
UTF-8
669
2.671875
3
[]
no_license
var app = new Vue({ el: '#app', data: { tasks: [ { id: 0, title: 'Tarea 1', pending: false }, { id: 1, title: 'Tarea 2', pending: true }, { id: 2, title: 'Tarea 3', pending: false } ], filtered: [], filter: '' }, methods: { sear...
true
5197cbab22356b75cfb0594a81178e5a1434e375
JavaScript
Evan-Jams/SEIR_Waverider_Classwork
/unit_1/w02d04/homework/objects.js
UTF-8
1,596
3.9375
4
[ "MIT", "GPL-3.0-only", "CC-BY-NC-SA-4.0", "CC-BY-NC-4.0", "LicenseRef-scancode-proprietary-license" ]
permissive
class Hamster { constructor(owner, name){ this.owner = owner; this.name = name; this.price = 15; } wheelRun(){ console.log("squeak squeak"); } eatFood(){ console.log("nibble nibble"); } getPrice(){ return this.price } } class Person { constructor(name){ this.name = name; ...
true
a300aa1f0f99f8c1db3e4363c6246adb120561de
JavaScript
oscaraolsson/Kandidatarbete
/client/orders/orders.js
UTF-8
5,272
2.53125
3
[]
no_license
$(document).ready(function () { viewOrders(); }); function viewOrders() { $.ajax({ url: '../order', type: 'GET', success(list) { for (i = 0; i < list.length; i++) { if (list[i].shipped == 1) { var prefix = "shipped"; } else { var prefix = "new" } ...
true
64e3c2c309e9fc1ae565093967a2998cef5f0c74
JavaScript
hungatea/newtradr
/src/Components/Advice.js
UTF-8
6,035
2.640625
3
[]
no_license
import React, { useState, useEffect } from "react"; import SP500 from './SP500.json'; import Prices from './prices.json'; export default function Advice(props) { const [expand1, setExpand1] = useState(false); const [expand2, setExpand2] = useState(false); const [expand3, setExpand3] = useState(false); ...
true
de55996aafd9880eb8a7ce024641cffe6b98bead
JavaScript
Portevent/bot_pwak
/nowalmanax/nowalmanax.js
UTF-8
2,781
2.703125
3
[]
no_license
const fetch = require('node-fetch'); const fs = require("fs"); class Nowalmanax { constructor(client) { this.client = client; this.day = 1; this.usersDroppedMention = new Map(); this.usersDroppedMention.set('day', this.day); this.questItem = 'nowalmanax_star'; this...
true
9b6c19fa9acbc68590815e32f29d368acfb0e3df
JavaScript
rpanasiuk/House-price-estimation
/src/app/actions/action_district.jsx
UTF-8
515
2.5625
3
[]
no_license
import axios from 'axios'; export const FETCH_DISTRICT = 'FETCH_DISTRICT'; export function fetchDistrict(object) { const config = { headers: { 'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*' } } const url = "http://127.0.0.1:8000/district"; const request = axios.post(url, obje...
true
42ef9e7c8b0f531a77914b18678386caaf52d3a7
JavaScript
aaronjtonner/Exchange-Rate-Calculator
/app.js
UTF-8
1,220
3.34375
3
[]
no_license
const currencyOne = document.getElementById('currency-one'); const currencyTwo = document.getElementById('currency-two'); const amountOne = document.getElementById('amount-one'); const amountTwo = document.getElementById('amount-two'); const rate = document.getElementById('rate'); const swapBtn = document.getElementByI...
true
5a8fcbd49f8e7d5325a75d21a9e5c0b1526e2ada
JavaScript
gregpinero/dvid-tileviewer
/tests/segmentation.js
UTF-8
1,735
2.765625
3
[ "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause" ]
permissive
(function($){ // setup var url = 'http://emrecon100.janelia.priv/api/node/2a3fd320aef011e4b0ce18037320227c/bodies/raw/0_1_2/1000_1000_1/2300_1800_3000'; var colors = {}; // set up a canvas var canvas = document.getElementById('canvas'); var ctx = canvas.getContext('2d'); // fetch data ...
true
0c78c1501fa710f0da2597ba758c56adca413eb4
JavaScript
DHVLLC314/Launch-Checklist-Form
/script.js
UTF-8
3,019
3.4375
3
[]
no_license
// Write your JavaScript code here! // This block of code shows how to format the HTML once you fetch some planetary JSON! window.addEventListener("load", function() { fetch("https://handlers.education.launchcode.org/static/planets.json").then(function(response) { console.log(response); response.json()...
true
a3f7583ecda0b0226497ee525471298dce6ea75c
JavaScript
daniel0ar/rfcx-espol-tutorial
/WebApplication/wwwroot/js/charts/stationView.js
UTF-8
9,487
3.203125
3
[ "MIT" ]
permissive
//get Id of Station var stationId = $("#stationId").text(); var CONFIG = { stationId : stationId, hoursAgo : 400, //From how many hours ago, I want retrieve first batch of data timeInterval : 5000, //At which rate I want to request for new single data. Milliseconds maxDataPointsAllowed : 15, //How many...
true
0a9ab76c91030118f87c8de23c246bb39fe52c3a
JavaScript
mren/chaos-monkey-testing-aws-terraform
/terminate-random-instance.js
UTF-8
2,290
2.8125
3
[]
no_license
const assert = require('assert'); const flatten = arrays => [].concat.apply([], arrays); const getRandom = array => array[Math.floor(Math.random() * array.length)]; const getInstanceById = (instanceId, instances) => instances .find(instance => instance.InstanceId === instanceId); const getTag = (instance, key) => ...
true
8cec8d8ff372de32b479d923742528c594dde456
JavaScript
kanekis-byte/my-react-app
/src/app/App.js
UTF-8
2,212
2.65625
3
[]
no_license
import React, { PropTypes } from 'react'; import logo from '../logo.svg'; import './App.css'; import { Button } from "antd"; import request from '../request'; // React Component 纯函数的形式创建组件 const App = ({ value, addNumber, deleteNumber, jumpPage }) => { const push = () => { jumpPage('/search'); }; ...
true
678da22effca95f52742845ee86b4f0570b90729
JavaScript
BrailaAlex/javascript
/Topics/classes/17.06.2020/task2/index.js
UTF-8
492
3.234375
3
[]
no_license
class Sportsman { constructor(name) { this.name = name; }; run() { console.log(`${this.name} is running`); }; }; class Swimmer extends Sportsman { constructor(name, swimmingStyle) { super(name), this.swimmingStyle = swimmingStyle } swim() { co...
true
c9f665788746b70fae9f374b25855e7f54a5d957
JavaScript
ibrahemomari/DSA
/401_code-challanges/Class_27/__test__/quickSort.test.js
UTF-8
775
2.875
3
[ "MIT" ]
permissive
"use strict"; const meargSort = require("../meargSort"); describe("merge Sort", () => { it("sort an array", () => { let arr = [8, 4, 23, 42, 16, 15]; let expected = [4, 8, 15, 16, 23, 42]; expect(meargSort(arr)).toEqual(expected); }); it("reverse-sorted array", () => { let arr = [20, 18, 12, 8,...
true
7c6eee8ba43dc98539c7a0e37e6ce275df0801ff
JavaScript
MosseyJohn/unit-4-game
/assets/game.js
UTF-8
1,701
3.734375
4
[]
no_license
$(document).ready(function() { var winCounter = 0; var lossCounter = 0; var randomNumber; var crystal1 = [3,6,9,12]; var crystal2 = [2,4,6,8,10]; var crystal3 = [1,3,5,7,9]; var crystal4 = [10,15,20,25]; var currentValue = 0; var result = 0; var totalScore = 0; var gameOver = false; function gameStart(){ current...
true
d0055b43e60efc7e9a77b05acb9aca042a374fa6
JavaScript
abhinavmish96/JAVASCRIPT_BY_EXAMPLE
/variables.js
UTF-8
612
4.1875
4
[ "MIT" ]
permissive
// variables are declared with 'var', 'let' and 'const var a = 'a' console.log(a) // change vars without a declaration a = 'aa' console.log(a) // let and const were added in ES6, and should be used over var const b = 'b' let c = 'c' console.log(b) console.log(c) // 'const' means constant, and cannot be changed // Th...
true
ddb226b187bb5f250e3e2ee02d6a82b487bf882a
JavaScript
umair-anis/oem-automation
/src/core/control/ControlBuilder.js
UTF-8
1,090
2.765625
3
[]
no_license
'use strict' const { cloneDeep } = require('lodash') const { isEmptyOrWhitespace } = require('../model/isEmptyOrWhitespace') const { isNullOrUndefined } = require('../model/isNullOrUndefined') /** * @description * @function ControlBuilder * @method setName * @method setProperty * @method build * @returns {Contr...
true
ec095ba7244ad0b47152e7b636999fa657a581ce
JavaScript
yoelalmiron1997/tygwe
/TP-1/Tp individual - Maxi Burgos/js/app.js
UTF-8
698
2.875
3
[]
no_license
function getRandom () { // eslint-disable-line const sentences = ['Ser profundamente amado te da fuerzas, mientras que amar profundamente a alguien te da coraje.', 'La felicidad de tu vida depende de la calidad de tus pensamientos.', 'El mayor enemigo del conocimiento no es la ignorancia, sino la ilusion del conocim...
true
4b474e47cf24c022f9d19c79e2e8325f228c1cc1
JavaScript
rucha2997/OCR_Tesseract_Image_To_PDF
/app.js
UTF-8
1,469
2.609375
3
[]
no_license
const express = require('express'); const app = express(); const fs = require('fs'); const multer = require('multer'); const { createWorker} = require('tesseract.js'); const worker = createWorker({ logger:m => console.log(m) }); const storage = multer.diskStorage({ destination: (req,file, cd) =>{ cd(...
true
4edec4606932ca6c9c32819d19c189492741883d
JavaScript
simsumin-std/teamOpenJava
/my.js
UTF-8
738
2.609375
3
[]
no_license
var nickname = $("#name").val(); var chatcontent = "dd"; var total = ""; $("#chatc") var setf = function() { nickname = $("#name").val(); alert("닉네임이 \"" + nickname + "\"으로 설정되었습니다."); } var enterf = function() { chatcontent = $("#chatc").val(); total = "<p>" + "<span style='color:#2F64B9'>" + ni...
true
5a6ac229e74b6eb62865694a2e5ebfc0efd37fd6
JavaScript
cheesehieep/to-do-redux
/src/redux/reducer.js
UTF-8
1,631
2.90625
3
[]
no_license
import * as types from './actions'; const initialState = { todos: [], }; const reducer = (state = initialState, action) => { console.log(action) switch (action.type) { case types.ADD_TODO: return { ...state, todos: [...state.todos, action.payload] }; case types.UPDATE_TODO: ...
true
df327d33e0d6e0a2ca28c75cd3dd4797df1caf17
JavaScript
elee5696/practice-problems
/drills01/yourcode.js
UTF-8
902
3.78125
4
[]
no_license
function sumArray(numbers){ var number; var sum = null; for(number of numbers) { sum += number; } return sum; } function fitWithinVal(numbers, target){ var number; var sum = 0; var newArr = []; for(number of numbers) { if(number + sum >= target) { continue; } else { sum += nu...
true
7f5deba7de47110366f94e9b4c914750c62d01ae
JavaScript
Ylianst/MeshCommander
/pki.js/PolicyMapping.js
UTF-8
4,455
2.796875
3
[ "Apache-2.0" ]
permissive
import * as asn1js from "asn1js"; import { getParametersValue, clearProps } from "pvutils"; //************************************************************************************** /** * Class from RFC5280 */ export default class PolicyMapping { //*********************************************************************...
true
43ac0669c39deb35621ab781af2345f2f0f9293b
JavaScript
stvnhng/firstweek
/0329Challenge.js
UTF-8
6,404
4.5
4
[]
no_license
// //Story 1 // Create a function that creates car objects which have a make, model year, and color. // // Add a function that returns make, model year, and color as one string and use the // method to tell the user the car's information. // // Challenges: // // Write a function that creates an object that represents a...
true
fcb342ebac1c35ab691c94d9fafb7bd4b0530830
JavaScript
Decidr/react-decidr
/src/components/Main/Main.js
UTF-8
2,657
2.640625
3
[ "MIT" ]
permissive
import React, { Component } from 'react'; import update from 'react-addons-update'; import Place from '../Place/Place'; import Nav from '../Nav/Nav'; export default class Main extends Component { constructor(props) { super(props); this.state = { search: { zip: '', category: 'restaura...
true
6584a8010a807c17905c9df6c6c41b0f4f4033e5
JavaScript
LiuWei102804/utils
/src/ruler/Ruler.js
UTF-8
7,395
2.859375
3
[]
no_license
class Ruler { constructor( el , options = { label : [0,100] , fill : true } ){ this.el = el; this.events = { change : [] } if( options.label.length < 2 ) { options.label[1] = options.label[0] + 100; } options.fillColor = options.fillColor || "...
true
ffe1815c394797b8b800d9a8e1af670e8a9980e0
JavaScript
soframel/luxparkings-view
/src/luxparkings-server.js
UTF-8
605
2.671875
3
[]
no_license
import axios from 'axios'; const serverUrl=process.env.VUE_APP_SERVER_URL; console.log("loaded server URL="+serverUrl); export async function getParkingNames () { //call luxparkings server to get parking names console.log("calling list of parkings"); return axios.get(serverUrl+"/parkings"); } export async funct...
true
ba8344aba501e4a19ce085a532bb09fb8473ef3d
JavaScript
razsilev/TelerikAcademy_Homework
/JavaScript/JS_Part_One/Homeworks/Js_part_One_Homeworks/07_Loops/scripts/2_OneToNNotDividable_3_7.js
UTF-8
260
3.265625
3
[ "MIT" ]
permissive
/* * 2. Write a script that prints all the numbers from 1 to N, * that are not divisible by 3 and 7 at the same time. */ var length = 77, i; for (i = 1; i <= length; i += 1) { if ((i % 21) !== 0) { jsConsole.writeLine(i); } }
true
c229750f01138ce91756170a713fd76ca242e4c6
JavaScript
akshaykverma/userStory
/public/app/js/controllers/storyCtrl.js
UTF-8
930
2.625
3
[]
no_license
angular.module('storyCtrl', ['storyService']) .controller('StoryController', function(Story, socketio){ var self = this; /*Setting all stories*/ Story.allStory() .then(function(response){ self.stories = response.data; }, function(error){ console.log('Error in storyController allStory() : ' +...
true
65065fd105dae074b6f5fb315ff968afa3f968a3
JavaScript
KabbalahOracle/kdx
/resources/rpc.js
UTF-8
6,910
2.59375
3
[]
no_license
if(typeof dpc == 'undefined'){ var dpc = (delay, fn)=>{ if(typeof delay == 'function'){ return setTimeout(delay, fn||0); }else{ return setTimeout(fn, delay||0); } } } class RPC { constructor(options={}){ this.online = false; this.timeout = 30; this.options = Object.assign({ bcastChannel:'kdx',...
true
7977083f92fcfc811f982ba3e157a12a165cd6b6
JavaScript
Royalsspirit/node-api-express
/controller/company.js
UTF-8
3,057
2.546875
3
[ "MIT" ]
permissive
const apiClient = require('../helper/apiClient.js'); const { companyDetails } = require('../validator/company.js'); const logger = require('../helper/logger.js'); const SOCIETECOM_API = process.env.enableSocietecomApi || true; const API_KEY = process.env.societecomApiKey || 'v7b7ikr3mka7p1fmc8nbblruualj9cv8qalbth3vk...
true
2fcbc5776709081702f3b62fd81803826bd55a4d
JavaScript
chiquyet199/react-tabs
/src/reducers/__tests__/inputField.js
UTF-8
1,155
2.5625
3
[]
no_license
import {SHOW_PASSWORD, LOAD} from "../../actions/types"; const fakeState = {test: "fakeState"}; const fieldReducer = require("../inputField").default; describe("Input Field reducer", () => { it("throw an error without an action", () => { expect(() => fieldReducer(fakeState)).toThrow(); }); it("return the ...
true
3bd759cc7e5f5fb07047f2338e0775cf27c20a65
JavaScript
CaseyMartin23/kumiai-discord-bot-admin
/client/src/actions/auth.js
UTF-8
1,587
2.515625
3
[]
no_license
import axios from "axios"; import { AUTH_ERROR, USER_LOADED, LOGIN_FAIL, LOGIN_SUCCESS, LOGOUT, CLEAR_DATA, } from "./types"; import { setAlert } from "./alert"; import setAuthToken from "../utils/setAuthToken"; const baseUrl = ""; export const loadUser = () => async (dispatch) => { //Set token from loca...
true
e1a42d8522690921abe93a5430c5f9f78c41ab76
JavaScript
Augustzyh/WebNotes
/reactnote/pro/9命令设计模式redux/record.js
UTF-8
2,143
2.578125
3
[]
no_license
//核心架构思想是面向对象的出发点,先设计好,再实现 import {reducer} from "./reactapp/src/redux3/redux3"; 何时使用? 命令模式是为了解决命令的请求者和命令的实现者之间的耦合关系 使用场景? 认为是命令的地方都可以使用命令模式 redux有着这样的思想 state只是当前组件的状态,redux提供共同数据,这个并不是react独有的 //本章分布 index.js + redux1 -> 基本操作 redux2+before->App -》组件使用 redux3+before->App -> 借助中间件处理异步操作 redux-thunk react-redux + 代码...
true
98bec812c322fc5ef5627e31032f06ff529b786e
JavaScript
elisa-mamolo/kitten-redux
/kitten-mern-redux-master/kitten-mern-redux-master/test/kitten.test.js
UTF-8
1,295
2.75
3
[]
no_license
const esmRequire = require('esm')(module); const { kittens } = esmRequire('../client/src/reducers/kittens'); const { addKitten, addHobby } = esmRequire('../client/src/actions'); it('can add kitten', () => { const action = addKitten(1, "Garfield", ['sleeping', 'eating']); const state = kittens([], action); ...
true
74c8b34ab3e27e5282ce33ea8432f2afd49a2a5a
JavaScript
chenqiao123/cq-ui
/packages/utli.js
UTF-8
178
2.890625
3
[]
no_license
export const setData = data => { const obj = { name: [], value: [] }; data.map(item => { obj.name.push(item.name); obj.value.push(item.value); }); return obj; };
true
b2537ec273d0da9804d210092092034f6adc7750
JavaScript
JackGit/rotate2
/index.js
UTF-8
4,428
2.703125
3
[]
no_license
(function (root, factory) { 'use strict' /* istanbul ignore next */ if (typeof exports === 'object') { // CommonJS module.exports = factory() } else if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define(factory) } else { // Browser globals ro...
true
68811f7fcc32a4ebd23c024964fd8259c36850c7
JavaScript
bnchhh/redux-start
/src/redux/reducers/cart.reducer.js
UTF-8
1,066
2.84375
3
[ "MIT" ]
permissive
import { GET_CART_ITEMS, ADD_TO_CART, REMOVE_FROM_CART, CHANGE_QUANTITY, } from "../actions/cart.actions"; export default (state = [], action) => { switch (action.type) { case GET_CART_ITEMS: return state; case ADD_TO_CART: { const { id, name, price, available } = action.payload; ...
true
a73940bf04c073968812fedd37450a75679a0b61
JavaScript
chongruei/practice-repo
/js/challenge5.js
UTF-8
904
3.328125
3
[]
no_license
var largeDiv = document.getElementById('largeId'); // id 更換成有css style的id largeDiv.id = 'largeDiv' largeDiv.style.fontSize = 'initial' largeDiv.style.backgroundSize = 'cover'; // 把原本的文字存下來 var defaultWording = largeDiv.innerText // 取得所有 thumbnail class 的 dom var allThumbs = document.querySelectorAll('.thumbnail'); ...
true
e5bbbd63740602ed4777f7c247ca98ba1217d3e1
JavaScript
gaoconggit/CodeGenerator
/BestExpress/BestExpress/BestExpress/_theme/handsontable/src/shims/runtime.js
UTF-8
12,953
2.640625
3
[ "MIT" ]
permissive
// jscs:disable /* jshint ignore:start */ (function(global) { 'use strict'; if (global.$traceurRuntime) { return; } var $Object = Object; var $TypeError = TypeError; var $create = $Object.create; var $defineProperties = $Object.defineProperties; var $defineProperty = $Object.defineProperty; var $f...
true
42e4a64cd75fda8ddcc1281f4080a322ac0a0294
JavaScript
dubesar/JavaScriptEssentials
/React/Advanced JSX/13.map.js
UTF-8
884
3.390625
3
[]
no_license
// Example // const strings = ['Home', 'Shop', 'About Me']; // const listItems = strings.map(string => <li>{string}</li>); // <ul>{listItems}</ul> // This is fine in JSX, not in an explicit array: // <ul> // <li>item 1</li> // <li>item 2</li> // <li>item 3</li> // </ul> // // This is also fine! // const liAr...
true
4556d73ec7bda9cbb60cbc8c8dc1a50fe2997b93
JavaScript
naimahassan43/Javascript-MSB
/string/index.js
UTF-8
2,284
4.0625
4
[]
no_license
let country = 'Bangladesh'; //node string/index.js console.log(country); // console.log(typeof country); // console.log(country[4]); // console.log(country.charAt(4)); // console.log(country.charAt(12)); // console.log(country[12]); // console.log(country.length); //String Methods let message = "Please rep...
true
d4d4df14335ea34c332943b3ea713e8e00598819
JavaScript
zucchinidev/ES6Recipes
/Decorators/Decorators.js
UTF-8
1,170
3.984375
4
[ "MIT" ]
permissive
/* Propuesta para ES2016 Es una expresión Evalúa una función Toma el target, name y el descriptor del decorador como argumentos Opcionalmente retorna un descriptor de decorator para instalar en el objeto target. */ class Person { constructor({first, last}) { this.first = first; this.last = last; } @rea...
true
80e3a538f9510196be003ff3f145360b65b3d5cb
JavaScript
CloudNStoyan/blog
/Blog.Web/wwwroot/js/mobile-menu.js
UTF-8
1,130
2.859375
3
[]
no_license
const menuBtn = document.querySelector('.menu'); const navMenu = document.querySelector('.navigation nav'); const menuOverlay = document.querySelector('.menu-overlay'); const menuOpenClass = 'show'; const openMenu = (e) => { e.preventDefault(); navMenu.classList.add(menuOpenClass); } const closeMenu = ...
true
c3aef130db18f21d10700f763c3138e9e6bd0354
JavaScript
gsoft-inc/sg-orbit
/packages/components/src/button/docs/ControlledToggleButton.sample.jsx
UTF-8
485
2.71875
3
[ "Apache-2.0" ]
permissive
() => { const [isChecked, setIsChecked] = useState(false); const handleChange = useCallback((event, newValue) => { setIsChecked(x => !x); console.log(!newValue); }, [setIsChecked]); return ( <ToggleButton checked={isChecked} value="isActive" ...
true
6739f163b31f3a6eee72c344bf577e927086fb25
JavaScript
gyacynuk/csc412-report
/interactive-report/src/api/audio.js
UTF-8
2,406
2.546875
3
[]
no_license
import training0 from '../assets/audio/survey/training-0.wav' import training1 from '../assets/audio/survey/training-1.wav' import training2 from '../assets/audio/survey/training-2.wav' import training3 from '../assets/audio/survey/training-3.wav' import training4 from '../assets/audio/survey/training-4.wav' import tra...
true
7f3106a4caf892b10366f057deca84cedf0c70a5
JavaScript
toriwat328/codechallenges
/codingchallenges/hackerrank/superstack.js
UTF-8
1,017
3.453125
3
[]
no_license
let stack = []; function superStack(operations) { for(let i = 0; i < operations.length; i++){ let op = operations[i].split(' ') if(op[0] === 'push'){ let v = parseInt(op[1]) stack.push(v); console.log(stack[stack.length-1]) }else if(op[0] === 'pop'){ ...
true
87b1b56a326dd6241c37420cd3b42f24f0c7cc0c
JavaScript
h0lms/calck
/random.js
UTF-8
410
2.984375
3
[]
no_license
const sectionBtn = $(".section__btn"); const btn = $(".btn"); const result = $(".section__result"); btn.on("click", (e) => { e.preventDefault(); let inputMin = parseInt($("[name^='min']").val()); let inputMax = parseInt($("[name^='max']").val()); result.text(getRandomNumber(inputMin, inputMax)); }); function...
true
88763a2d6eca95eeacb64eb70bf0846e52c8c8f1
JavaScript
sergey-zhidkov/CodeEval
/src/medium/pass-triangle.js
UTF-8
933
3.390625
3
[]
no_license
var fs = require("fs"); var arr = []; fs.readFileSync(process.argv[2]).toString().split('\n').forEach(function(line) { line = line.trim(); var numbers = line.split(' '); arr.push(stringToIntArr(numbers)); }); console.log(findMax(arr)); function findMax() { var level = 0; var rootIndex = 0; var ...
true
7c6e6af66e2080456914eaa70507e962e1ed75c8
JavaScript
Hangover0/RUIFENG
/中级阶段/ES6Test/src/js/person.js
UTF-8
417
3.71875
4
[]
no_license
//定义Person类 class Person{ //构造器 //创建对象使用,自动调用 constructor(name, age){ this.name = name; this.age = age; console.log("烟消云散"); } //方法 description() { console.log(`Hello, I am ${this.name}, I am ${this.age} years old.`) } //静态方法 static play(str) { ...
true
599f29ad35abaeb69ca68ff32ad8eb3b0655cf11
JavaScript
brunomichelin/mean-stack-web-app
/app/roupa/index.controller.js
UTF-8
6,054
2.53125
3
[ "MIT" ]
permissive
(function () { 'use strict'; angular .module('app') .controller('Roupa.IndexController', Controller); function Controller($window, RoupaService, FlashService) { var vm = this; vm.productList = null; vm.product = null; vm.newProduct = newProduct; ...
true
21d39c9db29834ae099087faaa2a7172ea070605
JavaScript
Gex720/Kod2
/sprawdzian2.js
UTF-8
1,323
4.03125
4
[]
no_license
var tablica = new Array(987, 11, 23, 4, 26, 1, 2, 58, 99, 12); //dodawanie Array.prototype.Sum = function() { var wynik = 0; for(let i = 0; i < this.length; i++) { z = this[i]; wynik = wynik + z; } return wynik; } //odejmowanie var tablica = new Array(987, 11, 23, 4, 26, 1, 2, 58, 99, ...
true
44ad343b8b779767ffbfa4444ef11676c6ebb7cd
JavaScript
PhilShishov/Software-University
/JS Advanced/Homeworks/04.JS-Classes_Lab/07. String Builder/string-builder-tests.js
UTF-8
6,112
3.15625
3
[ "MIT" ]
permissive
const StringBuilder = require('./string-builder'); const assert = require('chai').assert; describe('String Builder Tests', function () { let stringBuilder; beforeEach(function () { stringBuilder = new StringBuilder(); }); it('should have the correct function properties', function () { ...
true