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
0a19abf9dbe325355c5615d2c7ec552aab37d9b3
JavaScript
luctst/pokedex
/poke-cards/components/RenderTrainer.js
UTF-8
1,362
2.546875
3
[]
no_license
export default class RenderTrainer { constructor(el, data) { this.renderTrainer(el, data) } renderTrainer(el, data) { el.innerHTML = ` <header class="container-fluid"> <div class="row"> <div class="col-12 d-flex align-items-center mt-4 text-center"> ...
true
fabc4f94ed101ed548fc5c2cf9b9dbf68c73ec3f
JavaScript
Samreen-2021/JavaScript-Problem-Solving-Practice
/Js Variables/define Variables/app.js
UTF-8
493
4.03125
4
[]
no_license
// / define variable let x=4; console.log(x) document.write("<br>"+"variable value is " + x) // / define string let y='banana'; console.log(y) document.write("<br>"+"string variable value is " + y) let a ='123'; console.log(a) document.write("<br>"+"string variable value is " + a) // / define boolean // the o...
true
e01f2365cbe75cc7126c3d4e97603f422e1f98b5
JavaScript
Sammyjroberts/shuttergram
/app_api/models/user.model.js
UTF-8
4,595
2.609375
3
[]
no_license
/** * Created by deanroberts on 6/21/17. */ const con = require("../../config/connection"); const crypto = require("crypto"); const jwt = require('jsonwebtoken'); const CREATE_TABLE_QUERY = ` CREATE TABLE IF NOT EXISTS user ( ID int(11) NOT NULL AUTO_INCREMENT, firstName varchar(45) NOT NULL, lastName varchar...
true
cbbe7adbd2d7636cc3b6ae63d15196e00191f2df
JavaScript
MukulSethi123/firebase-demo
/public/app.js
UTF-8
1,907
3.046875
3
[]
no_license
const auth = firebase.auth(); const db = firebase.firestore(); const $ = document; const whenSignedIn = $.getElementById("whenSignedIn"); const whenSignedOut = $.getElementById("whenSignedOut"); const createThing = $.getElementById("createThing"); const thingsList = $.getElementById("thingsList"); const signInBtn = $....
true
31636365d6cabef27792477d6e6be49317a5d20d
JavaScript
laffed/Leetcode-JS
/OA/trappingRainWater.js
UTF-8
1,097
4.21875
4
[]
no_license
/* 42. Trapping Rain Water Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. Example: Input: [0,1,0,2,1,0,1,3,2,1,2,1] Output: 6 */ function trappingRainWater(heights) { const leftMaxH = []; const rightMaxH =...
true
6e5ce132396636c06fad15c66776bb444a40ed29
JavaScript
imaslarab/MedicalMgmt
/client/src/components/ObjectDropDown.jsx
UTF-8
2,373
2.671875
3
[]
no_license
import React, { Component } from 'react'; class ObjectDropDown extends Component { constructor(props) { super(props); this.state = { }; this.handleChange = this.handleChange.bind(this); this.findSelectedElement = this.findSelectedElement.bind(this); } findSelectedE...
true
06042cb055c653f55a1b14d69c91df9472aac9af
JavaScript
atomantic/undermore
/src/_source/_.fnMore.js
UTF-8
921
3.03125
3
[ "MIT" ]
permissive
_.mixin({ /** * get a new function, which runs two functions serially within a given context * * @function module:undermore.fnMore * @param {function} originalFn The original function to run * @param {function} moreFn The extra function to run in the same context after the first * @par...
true
c20885e10f88aba07f02a7af3381bfb6a2aefd43
JavaScript
TrendingTechnology/react-native-nfc-manager
/example/AndroidMifareClassic.js
UTF-8
6,484
2.53125
3
[ "Apache-2.0" ]
permissive
import React, { Component } from 'react'; import { View, Text, Platform, TouchableOpacity, TextInput, ScrollView, } from 'react-native'; import NfcManager, { ByteParser, NfcTech } from 'react-native-nfc-manager'; const KeyTypes = ['A', 'B']; class App extends Component { constructor(props) { super(p...
true
e7d348e0c6a469520d892309d7af0309d834c589
JavaScript
Stranger83/July-24
/Expression.js
UTF-8
102
2.8125
3
[]
no_license
function solve() { let x = Math.pow(((30 + 25) * (1/3) * (35 - 14 - 12)),2); console.log(x); }
true
70741a6a45c7375235fe75966204b8dd25d72bc6
JavaScript
dechristopher/math.gl
/modules/culling/test/lib/plane.spec.js
UTF-8
6,070
2.703125
3
[ "MIT", "Apache-2.0" ]
permissive
// This file is derived from the Cesium math library under Apache 2 license // See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md /* eslint-disable */ import test from 'tape-catch'; import {tapeEquals} from 'test/utils/tape-assertions'; import {configure, _MathUtils, Vector3, Ma...
true
c05809858b2c4144a81d898bc02c4b6199dfc2d9
JavaScript
Anthony-Verges/Wild-restaurant-menu
/src/components/MenuItem.js
UTF-8
1,150
2.703125
3
[]
no_license
import React from "react"; import { Component } from "react"; class MenuItem extends Component { constructor(props) { super(props); this.state = { isFavorite : false }; } //create a state isFavorite that has the inital value of isFavorite that comes from the props render() { return ( ...
true
a0f8f2f5b7c47dde0623453376b7604f56c3f157
JavaScript
mainlyetcetera/fitlit
/test/UserRepo-test.js
UTF-8
1,836
2.75
3
[]
no_license
const chai = require('chai'); const expect = chai.expect; const UserRepo = require('../src/UserRepo'); describe('UserRepo', () => { let dataset, userRepo; beforeEach(() => { dataset = [ { "id": 1, "name": "Brian Forbes", "address": "123 Blah St, Denver CO, 66666", "email...
true
b82b80ac9bdb20255b4a7b9b0d9c3a9ab89a1092
JavaScript
val4o89/JS-Homeworks
/StringsAndRegularExpressions/word-occurances.js
UTF-8
249
3.40625
3
[]
no_license
function count(sentence, pattern) { let regex = new RegExp('\\b'+pattern + '\\b', 'gi'); if(regex.test(sentence)) console.log(sentence.match(regex).length); else console.log(0); } count("Theeeee ", 'there')
true
3710fae7d9739650020fc6edc6e3a23bbf5b1877
JavaScript
CauldronDevelopmentLLC/FabMo-Engine
/runtime/passthrough/index.js
UTF-8
1,993
2.734375
3
[ "Apache-2.0" ]
permissive
/* * runtime/passthrough/index.js * * This module defines the PassthroughRuntime which is a short-lived * attempt to pass G2 commands directly through the machine model to G2, to allow for things * like chilipeppr, etc to speak with the motion controller directly. It plays havoc with FabMo's * internal sense of...
true
59a77bb708dee5f722bb715b12db382d5aae76f0
JavaScript
pamuba/JulyUI
/NodeJS/count.js
UTF-8
355
2.578125
3
[]
no_license
var name = require('./third') var counter = function(arr){ return `There are ${arr.length} elements in the array` } var add = function(a,b){ return `Sum:${a+b}` } const pi = 3.14; // module.exports.counter = counter; // module.exports.add = add; // module.exports.pi = pi; module.exports = { counter:co...
true
e41a35795491eaaba42cf4be3e7c47acf6ba091b
JavaScript
ahibiv60/Web_lab9
/web_lab9/js/news.js
UTF-8
1,832
3.1875
3
[]
no_license
var useLocalStorage = false; var allNews = []; function isOnline() { return window.navigator.onLine; } if (useLocalStorage === true) { if (isOnline() === true) { if (localStorage.getItem('news') !== null) { var array = JSON.parse(localStorage.getItem('news')); for (var x = 0; x...
true
562a1bc874f836d71cd3a16d172bae63c6702eb2
JavaScript
NoahWarnke/interweave.network
/formods/1/SimpleText.js
UTF-8
3,363
2.921875
3
[]
no_license
import Explore from './SimpleTextExplore.js'; import Build from './SimpleTextBuild.js'; import SimpleTextNodeData from './SimpleTextNodeData.js'; /** A Class for a format module whose instances contain: * - an explore component instantiator * - a view component instantiator * - a method of validating data in this f...
true
8090fa2169d4ba8dd17159c00379052d6d7a2c7b
JavaScript
JINZHANG2017/quiz
/front-end/src/components/Mall.js
UTF-8
1,249
2.703125
3
[]
no_license
import React, { Component } from 'react'; import MallProduct from './MallProduct' class Mall extends Component { state={ data:[] } componentDidMount() { console.log("didmount"); let url="http://localhost:8080/product/list"; // const response = await fetch(url); // co...
true
c4ff3273cd462d8b7d6bbfa31ab1924861089d49
JavaScript
letumfalx/TheStarvingSnake
/assets/js/GMPixi/gmpixi.room.js
UTF-8
3,920
2.75
3
[]
no_license
/* global GMPixi, PIXI, Function */ /** * Creates an instance of room. * @param {Object} details contains the data for the room * @returns {GMPixi.Room} */ GMPixi.Room = function(details) { PIXI.Container.call(this); //setting the room global details this.room = details.room; this.rooms = de...
true
e26b993c9f1496c5b0acb791883c2a64042c9540
JavaScript
Gajenthran/LeQuiz
/client/src/components/Dev/SeeQuiz.js
UTF-8
1,112
2.515625
3
[ "MIT" ]
permissive
import React, { useState, useEffect } from 'react' import { ENDPOINT } from '../../config/endpoint' import { fetchWrapper } from '../constants/fetch' import './Dev.css' const SeeQuiz = () => { const [loading, setLoading] = useState(false) const [questions, setQuestions] = useState([]) // const [error, setError]...
true
370577f6a05493dfd522f9edf077de3d22e48fce
JavaScript
LeetcodeJavaScript/Leetcode-JavaScript
/278 First Bad Version.js
UTF-8
1,214
3.296875
3
[ "MIT" ]
permissive
function solution(isBadVersion) { return getBadVersion; function getBadVersion(n) { var l = 0; var r = n; // Try to make l and r as the index of first bad version // so if mid is bad verion // FROM [G (L)] G G G G B B [B (M)] B B [B (R)] // TO [G (...
true
bf2c0f9ccffed7796cd44aacf3451778a4126138
JavaScript
jonathanclare/iadesigner
/src/ia/ui/MapTools.js
UTF-8
18,885
2.65625
3
[]
no_license
/** * <code>ia.MapTools</code> is a set of map tools that can be attached to a map. * * @author J Clare * @class ia.MapTools * @constructor * @param {ia.Map} map The associated map object. * @param {ia.DataGroup} dataGroup The associated data group. * @param {ia.InteractionGroup} interactionGroup The associated...
true
f5d0081d764f63f8e88f6d9ffaaef03fbce3d7ba
JavaScript
kasperisager/allie
/lib/utility/html/children.js
UTF-8
614
2.734375
3
[ "MIT" ]
permissive
import {map, filter} from 'bundstreg'; import {prop} from 'hoardom'; /** * Get the children of an element. * * @param {Element} element * @param {Object} options * @return {Array<Element>} */ export default function children(element, options = {}) { const {elements = true, texts = true} = options; const chi...
true
dafd0ae854e38d2cbc9b3875c0390e344d0f759d
JavaScript
MitanshuShaBa/Deep-Blue-Server
/static/js/index.js
UTF-8
3,554
2.84375
3
[]
no_license
let streamingDocument = document.getElementById("streaming"); let nameDiv = document.getElementById("name"); let dobDiv = document.getElementById("dob"); let emailDiv = document.getElementById("email"); let genderDiv = document.getElementById("gender"); let phoneNumDiv = document.getElementById("phone_num"); let addres...
true
b5b90a5a66e5a540f8a40f7e6f33523b8c687f87
JavaScript
alilou990/houser
/src/store.js
UTF-8
1,454
2.5625
3
[]
no_license
import {createStore} from 'redux' const initialState = { name: '', address: '', city: '', state: '', zip: 0, img: '', mortgage: 0, rent: 0 } export const UPDATE_NAME = "UPDATE_NAME"; export const UPDATE_ADDRESS = "UPDATE_ADDRESS"; export const UPDATE_CITY = "UPDATE_CITY"; export const ...
true
b44e1b2917e8fad09481661e7a6b9984a630e559
JavaScript
BagasMuharom/bukosan
/public/js/form.js
UTF-8
1,666
2.828125
3
[ "MIT" ]
permissive
'use strict' var config = { inputSelector : '.bukosan.input-ui' }; // Input Form UI $(config.inputSelector).each(function(){ var elem = $(this); var isAutofocus = elem.attr('autofocus'); // Mendapatkan placeholder var placeholder = elem.attr('placeholder'); var value = elem.attr('value'); ...
true
85aa1ba7df875335494ff3dabe77f67e9e72218d
JavaScript
alexey221284/brackets
/src/index.js
UTF-8
840
2.9375
3
[ "MIT" ]
permissive
module.exports = function check(str, bracketsConfig) { str=str.split(""); let open=[]; let close=[]; let sam=[]; for (let i=0; i<bracketsConfig.length; i++) { if (bracketsConfig[i][0]==bracketsConfig[i][1]) { sam.push(bracketsConfig[i][0]); } else { open.push(bracketsConfig[i][0]); ...
true
4821fbbe37c02d171950b6d05d767ff2c6c80097
JavaScript
madzia89/wyzwanieJS
/What's the Data Type?/script.js
UTF-8
800
4.84375
5
[]
no_license
// Create a function that returns the data type of a given variable. These are the eight data types this challenge will be testing for: // Array // Object // String // Number // Boolean // Null // Undefined // Date // Examples // dataType([1, 2, 3, 4]) ➞ "array" // // dataType({key: "value"}) ➞ "object" // // dataType(...
true
0b3ffd5f5bc2e7b163b04ff89549c43bd1bed113
JavaScript
nisailhan/AutowareArchitectureProposal.iv
/common/util/web_controller/autoware_web_controller/www/autoware_web_controller/js/vehicle_engage.js
UTF-8
5,435
2.625
3
[ "Apache-2.0" ]
permissive
if (!VehicleEngagePublisher) { var VehicleEngagePublisher = { ros: null, name: "", init: function () { this.ros = new ROSLIB.Ros(); this.ros.on("error", function (error) { document.getElementById("state").innerHTML = "Error"; }); this.ros.on("connection", function (error) {...
true
ddafe46eed58487dc8cb240bd1efc8723c6e5fdc
JavaScript
ArkJedenbog/SuperHeroes-InnerCore
/dev/effects.js
UTF-8
20,353
2.578125
3
[]
no_license
Callback.addCallback("tick", function(){ var helmet = Player.getArmorSlot(0); var chest = Player.getArmorSlot(1); var legs = Player.getArmorSlot(2); var boots = Player.getArmorSlot(3); var pos = Player.getPosition(); if (helmet.id == ItemID.batmanhelmet && chest.id == ItemID.batmanchestplate && legs...
true
e0c3247efa0b804890048e417b0f84affd7ac0f6
JavaScript
tddmanju/Asteroids
/lib/game.js
UTF-8
8,992
2.828125
3
[]
no_license
(function(){ window.Asteroids = window.Asteroids || {}; var Game = window.Asteroids.Game = function () { this.asteroids = []; this.bullets = []; this.movingParticles = []; this.staticParticles = []; this.items = []; this.ship = new window.Asteroids.Ship(this); this.points = 0; this....
true
eab8c7f820c9c30125c5a09f37122d458f70d0a9
JavaScript
TomOrth/Storm-Scouter-User-Web
/scripts/game.js
UTF-8
3,582
2.546875
3
[]
no_license
//Variables //Gets the variables from receive.js var t = team, m = match, a = alli; var roboAuto = 0; var taz = 0, caz = 0, tsaz = 0, cc = 0; var t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0; var c1 = 0, c2 = 0, c3 = 0, c4 = 0, c5 = 0, c6 = 0; var nic = 0; var co1 = 0, co2 = 0, c03 = 0, c04 = 0; var notes = ""...
true
2ccfff6a3520ced4e75edf4bacbe8f0aa7f28c3e
JavaScript
bradLegg/GUI-I
/HW4_part2/multiTable.js
UTF-8
8,405
3.1875
3
[]
no_license
/* Author: Bradley R. Legg, UMass Lowell Computer Science, bradley_legg@student.uml.edu a. Bradley R. Legg b. 9 August 2021 c. Webpage used to show a dynamic multipliation table written in JS with error handling. Improved version. */ // used to generate a table (row|col) using HTML <th> <tr> <td> ...
true
aa4a07d248b673b43f1313d55cec8ce57323aaa3
JavaScript
aaronshaf/panda-ui
/src/utils.js
UTF-8
797
3.078125
3
[ "MIT" ]
permissive
const abcSort = (a, b) => (a < b ? -1 : 1); const objToVars = (prefix, obj) => { return Object.entries(obj).reduce((state, [key, val]) => { if (typeof val === "string") { const valParts = val.split(": "); return state.concat([ `${prefix}-${key}: ${valParts[valParts.length - 1]};` ]); ...
true
86af254c33bf8fa271d2c554c26d5a49b9a8104d
JavaScript
yang035/ladmin
/public/fecar/es/module/tr-select.js
UTF-8
564
2.703125
3
[ "MIT" ]
permissive
// 表格中单选和多选(全选) const $singleTr = $(".js-tr-single"); const $multiTable = $(".js-table-multi"); $singleTr.on("click", "tr", function(){ let $this = $(this); if(!(window.getSelection().toString())){ $this.toggleClass("info").siblings().removeClass("info"); } }); $multiTable.on("change", "th :checkbox", funct...
true
e5e95e0fd1d21eadd9d77db18c38c344f38275d9
JavaScript
wissalKhalfi/Brain-Up---Tizen-smart-TV
/Quizz/js/main.js
UTF-8
1,698
2.6875
3
[]
no_license
var current_item = 0; var total_item = 4; window.onload = function() { navigation("RIGHT"); document.addEventListener('keydown', function(e) { switch (e.keyCode) { case 37: //LEFT arrow /*navigation("LEFT");*/ break; case TvKeyCode.KEY_UP: //UP arr...
true
bc622ea95679b31109787153da5c3896985fbad3
JavaScript
ariutta/jsonld.js
/lib/_isBoolean.js
UTF-8
145
2.859375
3
[ "BSD-3-Clause" ]
permissive
export function _isBoolean(v) { return (typeof v === 'boolean' || Object.prototype.toString.call(v) === '[object Boolean]'); }
true
682689b87025cd88f11e9ccd9f97e27d3990afc4
JavaScript
janglz/citymobil-test
/src/state/initialState.js
UTF-8
2,234
2.59375
3
[]
no_license
import { useState, useEffect } from 'react'; /** * @constructor * @returns {Object} состояние * * структура состояния, наверное, слишком раздутая, но у меня же еще не одно тестовое, уважаемый проверяющий :) */ function State() { const [sortedBy, setSortedBy] = useState('none') // 'alphabet', 'alphabet-r...
true
e881167f5c032b6fec338f838cc293006f732eeb
JavaScript
danishprakash/ejs-exercises
/Ch2/looping_a_triangle.js
UTF-8
121
2.78125
3
[]
no_license
for(var a = 1; a <= 7; a++) { for(var b=0; b < a; b++) { process.stdout.write("#"); } process.stdout.write("\n"); }
true
f973ecc483760d1ed0d55fcc8bb728275aebf464
JavaScript
Deluxcode-paul/example_code
/yii2/essortickets/application/assets/assets/js/confirm-change-back.js
UTF-8
1,187
2.734375
3
[]
no_license
/** * This function use boobox. If bootbox retuns false, value of target returns in default attribute value. * @param {object} target target for handle. * @param {string} defaultValueAttribute attribute for get default value. * @param {string} confirmationMessage confirmation message for bootbox. * @returns {boole...
true
225fe3c2a9c3198c5605b13e8670c0b71505d5c0
JavaScript
rodrigodia/trabalhos
/trabalhos/javascript/for-loop.js
UTF-8
95
2.84375
3
[]
no_license
var total = 0; var limite = 10; for (let i = 0; i < limite; i++) { console.log(i); }
true
8b2ceca39a4dbaaf45bec9c04078a03f62dea9ac
JavaScript
scriptbees-pvt-ltd/sivapriya
/secondlargeandsmall.js
UTF-8
450
3.015625
3
[]
no_license
function second_large_small(arr_num) { arr_num.sort(function (x, y) { return x - y; }); var unique = [arr_num[0]]; var result = []; for (j = 1; j < arr_num.length; j++) { if (arr_num[j - 1] !== arr_num[j]) { unique.push(arr_num[j]); } } result...
true
13cf86b63517ebe7f228f9d7e3cadc8caefe52f8
JavaScript
Deddy389/escpos-server
/example/escpos.js
UTF-8
2,049
2.546875
3
[]
no_license
function ESCPos(server, options) { this.commands = []; this.addCommand = function(command, args) { this.commands.push({ command, args }) } this.text = function(...args) { this.addCommand('text', args); return this; } this.image = functi...
true
f0b40ef277f2897073720ff55501130e608ac8d0
JavaScript
vwedeoteghele/LightUp-AutoCare
/src/utilities/packages.js
UTF-8
1,500
2.578125
3
[]
no_license
require('dotenv').config(); const { promisify } = require('util'); const bcrypt = require('bcrypt'); const jwt = require('jsonwebtoken'); const { SALT, secret_token } = process.env; const signJWT = promisify(jwt.sign); const verifyJWT = promisify(jwt.verify); const _REQUEST = require('request'); const InvoiceGe...
true
c861c357da2ae41b7772292c4c129d64fc29efef
JavaScript
17leba/random-fe
/static/js/public.js
UTF-8
1,475
2.765625
3
[]
no_license
// polyfill localStorage function createCookie(key, value, exp) { var date = new Date() date.setTime(date.getTime() + (exp * 24 * 60 * 60 * 1000)) var expires = '; expires=' + date.toGMTString() document.cookie = key + '=' + value + expires + '; path=/' } function readCookie(key) { var nameEQ = key...
true
42f492d490bfece9c6db4a803100b34863e014e0
JavaScript
Swayam221/Sample-Codes
/stream video.js
UTF-8
1,487
2.59375
3
[]
no_license
// Make a get route to stream videos from app.get("/video", function (req, res) { mongodb.MongoClient.connect(url, function (error, client) { if (error) { res.status(500).json(error); return; } // Check for range headers to find our start time const range = req.headers.ran...
true
0d5e8458ec3f09bebb333416586efcf893f3224a
JavaScript
cosmosof/relationshipmanagement
/App/Sagas/QuestionsSagas.js
UTF-8
4,292
2.609375
3
[ "MIT" ]
permissive
import { put, call, take, select } from 'redux-saga/effects'; import { eventChannel, buffers, delay } from 'redux-saga'; import QuestionsActions from '../Redux/questionsRedux'; import firebase from 'react-native-firebase'; export const selectPartnersId = state => state.homescreen.approvedPeerId; //******************...
true
fb774385baa6e91ce51e2263909d4303b33b0068
JavaScript
urospetrovic34/Online-Computer-Shop
/client/src/reducers/korpaReducer.js
UTF-8
1,095
2.796875
3
[]
no_license
import {KORPA_ADD_PROIZVOD,KORPA_REMOVE_PROIZVOD,CLEAR_KORPA,KORPA_ERROR} from '../actions/types' const initialState = { stavke:[] } export default function(state=initialState,action) { switch(action.type) { case KORPA_ADD_PROIZVOD: const proizvod = action.payload const po...
true
02f7d1215aee7e325d7df644cfd10f7e21a6a5d9
JavaScript
wildskyf/bully-gen
/bully.js
UTF-8
906
3.578125
4
[ "MIT" ]
permissive
function isFirst(n, a) { var s = ""; if( Math.floor((n)/3) < 1) { return ""; } for (var i = 0; i < Math.floor(n/3); i++) { s += a; } return s+"者"; } function Bully() { var a = "霸凌"; var num = Number(document.getElementById("num").value); var print = document.getEle...
true
95a5676c36ea2f2f6238473e172fa889f3b7292b
JavaScript
JoannaFilipowska/javascript-workbook
/03week/towersOfHanoi.js
UTF-8
2,727
3.6875
4
[]
no_license
"use strict"; const assert = require("assert"); const readline = require("readline"); const rl = readline.createInterface({ input: process.stdin, output: process.stdout }); let stacks = { a: [4, 3, 2, 1], b: [], c: [] }; function printStacks() { console.log("a: " + stacks.a); console.log("b: " + stacks...
true
90e91b01f86a191cfebee1fbf59eebc6b81ae92f
JavaScript
flow-typed/flow-typed
/definitions/npm/rxjs_v6.x.x/flow_v0.72.x-v0.103.x/test_operator_count.js
UTF-8
677
2.59375
3
[ "MIT" ]
permissive
// @flow import { it } from "flow-typed-test"; import { of, Observable } from "rxjs"; import { count, buffer } from "rxjs/operators"; it("should always infer number", () => { const o = of(1, 2, 3).pipe(count(x => x > 1)); const j = of("a", "b", "c").pipe(count(x => x === "a")); }); it("should accept empty parame...
true
9e1e95d1536adf7c6dbbd242b978862eafdbaae5
JavaScript
Eyiperez/Blog-API
/routes/Public-Routers/post.js
UTF-8
1,015
2.53125
3
[]
no_license
const express = require('express'); const postRouter = express.Router(); const PostService = require('../../services/post'); // GET - READ POST postRouter.get('/:post_id', (req, res) => { const {post_id} = req.params; PostService.read(post_id) .then(data => { res.json(data); }) .c...
true
12f2935c4b632ee052a9232e975c01f3a039a392
JavaScript
MurgenGit/todo-react
/src/components/app/app.js
UTF-8
2,212
2.828125
3
[]
no_license
import React, { Component } from 'react'; import List from '../list/list'; import './app.css'; import DeleteCompleteItems from '../deleteCompletedItems/deleteCompletedItems'; export default class App extends Component { initialId = 1; constructor(props) { super(props) this.state = { todoItems: [], ...
true
99ec762598acae22983bd7800e729c65b1356709
JavaScript
vavasta/kanban-board
/src/reducers/taskReducer.js
UTF-8
4,527
2.65625
3
[]
no_license
const initialState = { Tasks: [] }; const tasksReducer = (state = initialState, action) => { switch (action.type) { case "MOVE-TASKS": const response = reorderTasks(state.Tasks, action.payload); const newMap = state.Tasks.map(obj => { const newObj = response.find(el => el.taskId === obj.ta...
true
8260fc8b43030519711a531fb448e444a3cfba3f
JavaScript
Blackwell805/CodingDojo
/Web_Fundamentals/MorningAlgos/morningAlgos.js
UTF-8
7,417
4.5
4
[]
no_license
//Challenge 1 function a(arr) { var b = arr.length; var temp = arr[b - 1]; arr[b - 1] = arr[0]; arr[0] = temp; return arr; } console.log(a[1, 2, 3]); console.log(a[2, 4]); //Challenge 2 function b(arr) { //MEMORIZE THIS FUNCTION var x = arr.length; for (var i = 0; i <...
true
2cbe12bb735608b233433a2cec3b6dabd17131ac
JavaScript
RakibRahman/JavaScript
/arrayMethods-v2/forEach.js
UTF-8
937
4.15625
4
[]
no_license
// ForEach // The Foreach method also allows us to iterate through all the items in an array but the difference is that it won't create any new array but rather it will execute the provided function on each item. const films = [ { name: "Tenet", year: 2020, rating: 7.5 }, { name: "Wonder Woman 1984", year: ...
true
1ff3acac50548d0ab3c5759b2f8e5e14296dcee0
JavaScript
macutko/VoicePod-server
/server/services/sound/_create_util.js
UTF-8
948
2.734375
3
[]
no_license
import { Sound } from '../../models/db'; import fs from 'fs'; import getAudioDurationInSeconds from 'get-audio-duration'; /** * helper function to create a sound object * @param fileName name of file for operation purpose * @param soundBits the actual sound bits * @param userIds list of users * @returns {Promise<...
true
34623fed964b0dff04560631e104a6e00334fb39
JavaScript
nanifour/tesla-clone
/src/components/Sections.js
UTF-8
3,489
2.671875
3
[]
no_license
import React from 'react' import styled from "styled-components" import Fade from "react-reveal/Fade" function Sections({title, description, leftBtnText, rightBtnText, backgroundImg, midBtnText}) { return ( <Wrap bgImage = {backgroundImg} > {/* pass in background image */} {/* fade text *...
true
f8914315470d11f3aa0b41949b6ddd55f70d7ca6
JavaScript
bbhye1/daily-coding-dojo
/Level1/20210618/idRule.test.js
UTF-8
3,059
3.484375
3
[]
no_license
function generateLetters(text) { return [...new Array(text.length)].map((_, i) => text[i]); } function chageLowerCase(text) { return text.toLowerCase(); } function deleteSpecialText(text) { const letters = generateLetters(text); const filteredLetter = letters.filter((letter) => !'~!@#$%^&*()=+[{]}:?,<>/'.inc...
true
9755d33a1be499fcf947540f885789980e702a74
JavaScript
davidcbbc/cuchycuchy
/js/scene/GameOver.js
UTF-8
1,289
2.625
3
[]
no_license
export default class gameOver extends Phaser.Scene { constructor(points) { super("GameOver"); } create() { const widht = this.game.config.width; const height = this.game.config.height; this.back = this.add.tileSprite(0,0,900,506,'bg').setDisplayOrigin(0,0).setDisplaySize(widht, heigh...
true
655970792efb3bcd61430772922acf47b562d340
JavaScript
darshanj03/Netflix-Home-Clone
/js/script.js
UTF-8
901
2.921875
3
[]
no_license
const listItems = document.querySelectorAll(".li-li"); const listContentItems = document.querySelectorAll(".list-content"); const icons = document.querySelectorAll(".icon"); listItems.forEach(item => item.addEventListener("click", showContent)); function showContent(e){ const icon = document.querySelector(`#${thi...
true
f63b0789abee7ffdd995d4d1f34cb5a1785f1577
JavaScript
zhangdaojun111/frontend2
/app/services/main/utils.js
UTF-8
426
2.625
3
[]
no_license
//工具函数 export const Utils = { formatParams: function (params) { //格式化用户名和密码 let result = []; for (let k in params) { if (typeof(params[k]) === 'object') { result.push(k + '=' + JSON.stringify(params[k])); } else { result.push(k + '=...
true
d5d119cc06a01c03e300ff31cd1c271391ce64f6
JavaScript
geoffreytran/dallas-hackday-2011-frontend
/web/UIWidgets/app/assistants/lists/list/mainList-assistant.js
UTF-8
2,547
2.75
3
[]
no_license
function MainlistAssistant(argFromPusher) { /* this is the creator function for your scene assistant object. It will be passed all the additional parameters (after the scene name) that were passed to pushScene. The reference to the scene controller (this.controller) has not be established yet, so any initiali...
true
b345125a4cfb09967918b57f1f692823732acc24
JavaScript
Satum/IdeaFactory
/test.js
UTF-8
157
2.640625
3
[]
no_license
var jas = 0; function test(var guestVar){ while(guestVar === 0){ console.log("This is all a test"); guestVar = 1; } } $window.onload(){ test(jas); }
true
a0915e4e1d7c630169eb73a8c70e894e351bdd03
JavaScript
maxmurdoch/flock
/src/components/SiteMetadata.js
UTF-8
909
2.53125
3
[ "MIT" ]
permissive
import React from 'react' import R from 'ramda' import PropTypes from 'prop-types' import Helmet from 'react-helmet' const notEmpty = R.compose( R.not, R.isEmpty ) const notNil = R.compose( R.not, R.isNil ) const noneNil = R.any(notNil) const isValid = R.allPass([notNil, notEmpty, noneNil]) const SiteMetad...
true
997c30134a2906116030b25e91dc89c210674a21
JavaScript
chris-calhoun/chatty-delta
/src/javascripts/components/multipleUsers.js
UTF-8
1,319
2.671875
3
[]
no_license
import userData from '../helpers/data/userData'; const dropDown = () => { const character = userData.getUsers(); const domString = ` <div class='dropdown'> <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdown-button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> ...
true
8067cf463bf17a9c10da4242f0e3d6b600201892
JavaScript
hpanditi/JavaExercisesAirbnb-22
/Exercise13.js
UTF-8
582
3.65625
4
[]
no_license
const ransomNote = (note, magazine) => { const magazineWords = magazine.split(" "); const magazineHash = {}; magazineWords.forEach(word => { if (!magazineHash[word]) magazineHash[word] = 0; magazineHash[word]++; }); const noteWords = note.split(" "); let possible = true; n...
true
40e4ead56fd6f05f0f1f70b04851b12a34b71701
JavaScript
cjpvillaruel/money-withdrawal-redux
/src/App.jsx
UTF-8
1,261
2.59375
3
[]
no_license
import React from 'react'; import formatNumber from 'format-number'; import photographer from './images/girl.png'; import './App.css'; import store from './store'; const setWithdrawAmount = amount => ({ type: 'WITHDRAW', amount }); const dispatchBtnAction = e => { const { amount } = e.target.dataset; store.dispatc...
true
4d1f6d6ea1e5348250844b1f31c5d6bd3b8ade14
JavaScript
meishal7/weather-app
/src/modules/googlePlaces.js
UTF-8
1,724
2.65625
3
[]
no_license
import getWeather from "./getWeather"; import displayCurrLocationWeather from "./displayCurrLocationWeather"; import getDegree from "./getDegree"; import displaySavedLocations from "./displaySavedLocations"; import storeLocations from "./storeLocations"; import toggleFooterBody from "./toggleFooterBody"; export defaul...
true
64d426b76dc3faeb1e149b41f7ab67391e9a95de
JavaScript
green-fox-academy/GabiKoran
/hackerrank_0701/K_22_birthdayCakeCandles.js
UTF-8
678
3.84375
4
[]
no_license
function birthdayCakeCandles(ar) { let sortedArr = ar.sort(function (a, b) { return b - a; }); console.log(sortedArr); let candles = 1; let i = 0; while (sortedArr[0] == sortedArr[i + 1]) { candles++; i++; } return candles; } let array1 = [1, 5, 6, 2, 3, 5, 6, 6]; console.log(birthdayCakeCa...
true
7243638ff36c21c74ae7053cbe38f239b911c367
JavaScript
DouglasParnoff/freecodecamp
/js-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-primes/sum-all-primes.js
UTF-8
413
3.703125
4
[]
no_license
function aSum(pArr){ return pArr.reduce( (acc, curr) => (acc + curr), 0); } function isPrime(refNumber){ for(let j = 2; j <= (refNumber / 2); j++){ if((refNumber % j) == 0){ return false; } } return true; } function sumPrimes(num) { let aPrime = []; for(let i = 2; i <= num; i++){ ...
true
487379cd57bcf5cf189e4a6c1454316df1d70e03
JavaScript
aviflax/3things
/js/data.js
UTF-8
4,645
2.53125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
// Generated by CoffeeScript 1.8.0 (function() { var create_blob, d, do_import, export_data_file, export_data_json, export_data_plaintext, handle_delete_click, handle_import_click, import_file, load_state, to_array, toggle_import_button, unhide, unhide_safari; d = document; to_array = function(sequential_thing)...
true
268477b02e05a548dfd43d1dc8831115e82ab156
JavaScript
ChanningPing/LitStoryTeller_Plus
/static/js/multipleLine/assembly_code.js
UTF-8
3,500
2.84375
3
[]
no_license
// define margins var margin = {top: 20, right: 80, bottom: 30, left: 150}; // graphics size without axis var width = 2000 - margin.left - margin.right; var height = 900 - margin.top - margin.bottom; var svg = d3.select("body").append("svg") .attr("width", width + margin.left + margin.right) .attr("height", h...
true
affd38b130536c730df127e9c495990494c1399c
JavaScript
leohongbing/h5_demo
/编程题/实现一个trim方法.js
UTF-8
92
2.625
3
[]
no_license
function trim(s) { return s.replace(/[(^\s+)|(\s+$)]/g, '') } console.log(trim(' ss '))
true
69dea5b00dd24ffe4e4be6ea8b80994cb10a3ab1
JavaScript
jeffreys-cat/learn-rxjs
/event.js
UTF-8
422
3.59375
4
[]
no_license
// Node.js中的EventEmitter const events = require('events'); const emitter = new events.EventEmitter(); emitter.on('event', function(arg1, arg2) { console.log('listener1', arg1, arg2); }); emitter.on('event', function(arg1, arg2) { console.log('listener2', arg1, arg2); }); emitter.emit('event', 'arguments1', 'arg...
true
99feeff67b6a8bc8f1029961bae82a1bd1082020
JavaScript
nootanghimire/meanstack-assignments
/fizzbuzz.js
UTF-8
831
4.625
5
[]
no_license
/** * @author Nootan Ghimre <nootan.ghimire@gmail.com> * * @desc To print number from 1 to 100, but when the number is * multiple of 3 -> print Fizz, and when 5 -> print Buzz * and when both -> print FizzBuzz * * @tutor Punit Jajodia * * Run the function `run()` to run this project */ function f...
true
c6090783c2582964303338ab4f865297861c27e9
JavaScript
nickdasilva8/react-todo
/express-backend/app.js
UTF-8
2,167
2.84375
3
[]
no_license
const express = require('express'); const app = express(); // const db = require('./src/dbConnect.js'); const dbInsertItem = require('./src/dbInsertItem'); const dbRetrieveList = require('./src/dbRetrieveList'); const dbDeleteItem = require('./src/dbDeleteItem'); console.log("application has started"); // Add header....
true
f86f0989a742662adc561fc80aceaab5d266f053
JavaScript
Nallaka/inventory
/js/inventory.js
UTF-8
2,480
3.0625
3
[]
no_license
let db = firebase.firestore(); const settings = {timestampsInSnapshots: true}; db.settings(settings); function getItemRef(upc) { return db.collection("inventory").doc(upc.toString()) } function addItem(name, upc, description, binNumber, consumable, totalStock, inStore, onHand) { getItemRef(upc).set(createItem...
true
8aca8bd65bb7b5227cc2d09733c54ff8281c2bb4
JavaScript
tessasherinsnidal/Portfolio
/js/main.js
UTF-8
3,372
2.90625
3
[]
no_license
/*for gallery click*/ function openImg2(imgName) { var i, x; x = document.getElementsByClassName("picture2"); for (i = 0; i < x.length; i++) { x[i].style.display = "none"; } document.getElementById(imgName).style.display = "block"; } function openImg(imgName) { var i, x; x = document.getElementsByCl...
true
7f4c37408659d0b8f48a59a43a55d76c4a480f8c
JavaScript
michaelegregious/vending-machine
/user-output.js
UTF-8
1,262
2.78125
3
[]
no_license
'use strict'; const ora = require('ora'); const chalk = require('chalk'); const output = { coinInserted(totalInserted) { const spinner = ora(' KA-CHUNK').start(); const output = `Amount Inserted: $${(totalInserted / 100).toFixed(2)}`; setTimeout(() => { spinner.text = ` ${output}`; spin...
true
3b59e57db40230e77350b8fbb5916e3627321c8b
JavaScript
sinthads/Back_end_exam
/helper/registerValidator.js
UTF-8
990
2.640625
3
[]
no_license
const emailValidator = require("./emailValidator"); const passwordValidator = require("./passwordValidator"); const query = require("../database"); const registerValidator = async (req, res, next) => { const { username, email, password } = req.body; if (username.length < 6) { return res.status(401).send("Usern...
true
222ed18bc5483ba6be054c0ea6b677dfa180f670
JavaScript
HermanZeng/dodo
/dodo/DodoWebApp/src/main/webapp/resources/js/users-form.js
UTF-8
8,426
2.796875
3
[]
no_license
var formType = 0; // create: 0, update: 1, show: 2; function prepareShow(currentId, currentFName, currentLName, currentEmail) { $("#dodo-modal-title").text('User Detail'); $(".dodo-form-item-tip").css({"display": "none"}); $(".dodo-form-item").css({"border-color": "#66afe9"}); $("#form-id-block").show...
true
5df0186b94c258f0dbf71bfd933ce9a12255324a
JavaScript
zachbradshaw/reshare
/controllers/res.js
UTF-8
2,627
2.65625
3
[]
no_license
var app = require('../reshare-app'), resStore = require('../data/res-store'), commentStore = require('../data/comment-store'), auth = require('../utils/auth'), promiseResponse = require('../utils/promise-response'); // Routes app.get('/api/res', listResources); app.get('/api/res/:id', getResource); app...
true
950ebbc2ca2229d0c0e68f208a8a563febbab92f
JavaScript
tiagomcoliveira/ProjetoPIIV
/JS/popupteste.js
UTF-8
332
2.65625
3
[ "MIT" ]
permissive
var c = 0; function Popup(){ if(c == 0){ document.getElementById("box").style.display = "block"; c = 1; } else{ document.getElementById("box").style.display = "none"; c = 0; } } var btn = document.getElementById('btn'); function remover() { document.getElementById('txt').remove(); this....
true
bf319599249d6a2823c700055d68c5c91ef8d539
JavaScript
hansonjo/project
/RainbowSeven/Web/js/home.js
UTF-8
492
3.015625
3
[]
no_license
var idx = 0; function onClickSlide(index) { idx = index; var slides = document.getElementsByClassName("image-slider"); console.log(slides); for (i = 0; i < slides.length; i++) { slides[i].style.display = "none"; } if (idx >= slides.length){ idx = 0; } else if (idx < 0) { idx = slides.length -...
true
85db495d9475a462564996cfe052563b240fe203
JavaScript
harishviru/ReactJS
/react_fundamentals/src/Components/State/Bike.js
UTF-8
293
2.609375
3
[]
no_license
import React from 'react' //#03 (i). Destructuring function Bike(props) { console.log('bk-',props) const {name,color}=props; return ( <div> {/* Destructuring props */} <h1> Bike :{name} -{color}</h1> </div> ) } export default Bike
true
758d73b12f4cfe165fe4550398e81c22f521c396
JavaScript
frontinorz/Google-map
/index.js
UTF-8
5,607
2.609375
3
[]
no_license
const urltest = 'http://opendata.hccg.gov.tw/dataset/1f334249-9b55-4c42-aec1-5a8a8b5e07ca/resource/4d5edb22-a15e-4097-8635-8e32f7db601a/download/20180619153742850.json'; const app = new Vue({ el: '#app', data: { bikedata: [], map: {}, infowindow: {}, isMarkerCreated: false, ...
true
323ce17edcf7e3a60cd48443222e519f47e8edd2
JavaScript
jstickle-codes/responsive-portfolio
/magic-8ball/js/script.js
UTF-8
1,211
3.125
3
[ "MIT" ]
permissive
$(document).ready(function(){ var magic8Ball = {}; magic8Ball.listOfAnswers = ["It is certain.", "As I see it.", "yes", "try again.", "Don't count on it."]; $("#answer").hide( ); magic8Ball.askQuestion = function (question) { $("#answer").fadeIn(4000); var randomNumber = Math.random(); var randomNum...
true
f422e1ea6ff67c93e07f2b6e98c361910a030f53
JavaScript
hamzadarej/liveCoding
/Feb/16.02 -test/different methods.js
UTF-8
457
3.046875
3
[]
no_license
function validPin(pin) { let result; let counter=0; let sum=pin.split("").reduce((el,a)=>parseInt(el) +parseInt(a)) for(i=0;i<pin.length;i++){ if(pin[i]==pin[i+1]){counter++} } result=pin.split().map((a)=>a.length==4 && a[a.length -1]%2==0 &&parseInt(a)==a && sum>=5&&counter<=2) return ...
true
b944eab4ac9c9a4a37a446c393bef2446c9af510
JavaScript
Muhendranofficial/Mugen
/script.js
UTF-8
949
3.09375
3
[]
no_license
'use strict' ////////////////////////////// ///////// Reveal Section const section = document.querySelectorAll('.section'); const revealSection = function (entries, observer) { const [entry] = entries; console.log(entry.target); if (!entry.isIntersecting) return; entry.target.classList.remove('secti...
true
a316041bd2e2d7abd9e4870a8116dba2978a8c77
JavaScript
Victor-Irzunov/libery_NODE.js
/SCHOOL--NODE.JS/lessons4_sessions and authorization/routes/orders.js
UTF-8
2,035
2.53125
3
[]
no_license
//№48 - Подготовка страницы заказов const { Router } = require('express') const Order = require('../models/order') const router = Router() const auth = require('../middleware/auth') //№55 - Защита роутов router.get('/', auth, async (req, res) => { //получк=ение списка ...
true
df49e327de2db2ee02cbacbd5be2fcf9c8e662c4
JavaScript
digideskio/azul
/lib/relations/belongs_to_config.js
UTF-8
6,858
2.59375
3
[ "MIT" ]
permissive
'use strict'; var _ = require('lodash'); var util = require('util'); var property = require('corazon/property'); var inflection = require('../util/inflection'); var Mixin = require('corazon/mixin'); /** * A helper function for creating config properties that either reads from a * cached value or calls a function to...
true
a58578e1440ef35a41957d93a8dfaff8cfe6a825
JavaScript
luukfroling/NeuralNetwork_3Layers
/p5main.js
UTF-8
921
3.75
4
[]
no_license
/****WRITTEN BY LUUK FRÖLING**** december 2017. variable to store the network in -> n variable to let the network train on the data multiple times for one click -> run Array of arrays to store the data. for every spot in the data array, the first array is the input data, and on the second spot is the desired outpu...
true
8a8247a755ce1980c33ff3d7c289ca8d6a27fce9
JavaScript
Volune/jade
/lib/filters.js
UTF-8
2,128
2.75
3
[ "MIT" ]
permissive
/*! * Jade - filters * Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ var transformers = require('transformers'); module.exports = filter; function filter(name, str, options){ if (typeof filter[name] === 'function') { var res = filter[name](str, options); } else if (transformers[n...
true
9e53bb92414e926d477eb1da569cdf76a081dd68
JavaScript
pmenabe/chef-mcfront-client
/src/App/api/_fetch.js
UTF-8
2,156
2.78125
3
[ "MIT" ]
permissive
import { history } from '../helpers/history' /** * GET method with authencation. * * @param {String} url */ function get(url) { return fetch(url, { method: 'GET', headers: authHeader() }) .then(handleErrors) .then(res => res.json()) } /** * POST method with authencation. * * @par...
true
5278a52665344d08ab046a0e3c5a877a9ed8f74b
JavaScript
anyl92/TILinSFY
/07_js/01_basic/04_number.js
UTF-8
113
3.015625
3
[]
no_license
let a = 1; let b = 2; let c = a + b; c = c + 10 c c -= 3; c c *= 10; c c /= 13; c c++ c c-- c ++c c --c c
true
98c48006e82bad3c024dcbd24c514759a68f5d72
JavaScript
jhelcq/proyecto_gee
/obtener_tabla_fecha_nubosidad.js
UTF-8
1,752
2.828125
3
[]
no_license
/* Autor: Jhonny Colmena Email: jhoelicq@hotmail.com Fecha: 2015-10-20 Descripcion: Script de obtencion de una tabla de id de imagenes de landsat con datos de fecha y porcentaje de nubosidad */ function obtenerTablaXFechaPorcentaje(idVector, fecIni, fecFin, nivelNubosidad){ var vector = ee.FeatureCollection('ft:'...
true
eac831665f7d51e9755c9e55b054316dc75e46b4
JavaScript
ariggs16/Functions
/exercise-2.js
UTF-8
1,355
4.71875
5
[]
no_license
// --------------------- // Define a function max() that takes two numbers as arguments and returns the largest of them. Use the if-then-else construct available in JavaScript. // --------------------- function max(a, b){ if (a > b) { return a } else { return b } } // (10>20 or 20>10) // -------...
true
06ca398eda165a6ddaeb9e1c6361ed11d4dcbfd1
JavaScript
JulietteGuilbaud/WebEngineerChallenge
/javascript.js
UTF-8
6,620
2.78125
3
[]
no_license
//true if client already ask for something var alreadyAsk = false; //true if client already add this in fav var isFav; //true if browser supports Storage var hasStorage; var ITEM = "Toronto.Waste.Fav"; var GREY = "rgb(184, 184, 184)"; var GREEN = "rgb(3, 148, 81)"; function initEventHandlers(){ hasStorage = (...
true
df0267118c1b4aa6cd6cf0a19430abbca9a9492a
JavaScript
rasikbhatt/ES6
/index.js
UTF-8
2,273
4.34375
4
[]
no_license
// let, const //these keywords are used to declare variables in ES6 let name = "applesauce"; //here the name is variable whose value we can change const birthyear = 1992; console.log(name, birthyear); // Arrow function const add = (a, b) => { return a + b; }; console.log(add(2, 3)); //Default parameter const divi...
true