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
85e3a63ef815e4909f069622d1b882eeeb703b45
JavaScript
SrdjanNikolin/AboutComponent
/wwwroot/js/gameDescription.js
UTF-8
13,176
2.609375
3
[]
no_license
var description = { 'GameId': 'getgameid', 'mainDescription' : '', 'Features': new Map() }; let testobj1 = {'Title': 'Singleplayer', 'Description': 'Singleplayer description'}; // let testobj2 = {'FeaturePoint': 'Multiplayer', 'FeatureDesc': 'Multiplayer description'}; description.Features.set('feature3', ...
true
74be4afb30e1b0ef54ca8016133858c70ed0a22d
JavaScript
Shams97/coding_challenge
/.history/problem2-solution-shams-naji_20211027224811.js
UTF-8
429
2.734375
3
[]
no_license
function validateRecipeWithQuantity(fridge, ingredients) { Object.keys(fridge).map((item,index) => { for(let i in ingredients) { { if(index === ingredients[i]) return console.log("true") else return console.log("false") } } }) ...
true
9b2a9a3576470ced7945d0d3ad3bb843b05e9b42
JavaScript
PresentMonkey/Thomas-edison-website
/static/serial.js
UTF-8
1,584
2.828125
3
[]
no_license
export class Serial{ /** * Static Function to open port * @returns {Serial} */ static newDevice(){ return new Serial(); } constructor(){ this.device; this.interfaceNumber = 2; this.endpointIn = 5; this.endpointOut = 4; } /** * Opens t...
true
0bb0bcce1544ae496711ab4268b09523b19e2a6a
JavaScript
bhosaleT/Cinema-wars
/src/components/MovieInput.js
UTF-8
1,394
2.625
3
[]
no_license
import React from "react"; import PropTypes from "prop-types"; export default class MovieInput extends React.Component { constructor(props) { super(props); this.state = { moviename: "" }; this.handleChange = this.handleChange.bind(this); this.handleSubmit = this.handleSubmit.bind(this); }...
true
1eae58540e86e134149be1dd03b547fc48eb4515
JavaScript
flyher/React-Todo
/oldversion/workflow/pubsub/pubsub.js
UTF-8
1,234
2.828125
3
[ "MIT" ]
permissive
/* var Pubsub = { subscribe: function(e, call) { var call = this._call || (this._call = { }); // 如果木有_call,新建一个call对象 (this._call[e] || (this._call[e] = [])).push(call); // 如果木有e事件则初始化其为数组 return this; // 返回新的对象 }, publish: function() { var arr = Array.prototype.slice.call(ar...
true
cb833daef66dbaa886a06e5174a458f323b334b6
JavaScript
ChristopherALee/Practice-Projects
/W6D1/arg_exercises/sum.js
UTF-8
311
3.421875
3
[]
no_license
function sum() { return Array.from(arguments).reduce((a, b) => a + b); } // return console.log(Array.from({'peter': 'pan', 'captain': 'hook'})); function splatSum(...args) { return args.reduce((a, b) => a + b); } // console.log(splatSum(1, 2, 3, 4) === 10); // console.log(splatSum(1, 2, 3, 4, 5) === 15);
true
60842b365cd3280461bc6d648c38491353ebb481
JavaScript
banerjeeupasana03/bcit-d3-courses
/term2-winter2019/dynamic-content-design-MDIA2109/dynamic_content_midterm_assets/apple_products_website/js/zoom.js
UTF-8
332
2.875
3
[]
no_license
function Zoom(){ var image = document.querySelector("#image_holder .image_item"); image.addEventListener("mouseenter", function(){ if(showMoreState){ image.classList.add("zoom"); } }); image.addEventListener("mouseout", function(){ if(showMoreState){ image.classList.remove("zoom"); ...
true
dc0207589fc7cc55c7d2228b60ba86bc161b91e2
JavaScript
dannyclifford/Chicago_Crime
/static/js/app.js
UTF-8
662
2.765625
3
[]
no_license
function init() { d3.json(`/pie`).then(function(response) { console.log("inside pie chart building..."); crime_types = []; crime_type_values = []; for (const [key, value] of Object.entries(response)) { console.log(key, value); crime_types.push(ke...
true
d7a6250f1b47bfa807abca3fe2ef140b25497eea
JavaScript
1juandiaz/dsm
/my-app/src/App.js
UTF-8
1,369
2.75
3
[]
no_license
import React, { Component } from 'react'; import logo from './logo.svg'; import './App.css'; import './components/item-lista'; import ItemLista from "./components/item-lista"; import './components/album-card'; import AlbumCard from "./components/album-card"; import './components/album-card-list'; import AlbumCardList f...
true
f1c4fa0ddf5dac282cfc0f5b4cff8624d8129217
JavaScript
lixiaohulee/algorithm
/fib.js
UTF-8
383
3.75
4
[]
no_license
const cache = [0,1]; function fib(n) { if (n <= 1) return cache[n]; if (cache[n]) return cache[n]; cache[n] = fib(n-1) + fib(n-2); return cache[n]; } console.log(fib(44)); function fib(n: number): number { if (n < 2) return n; let f = 0; let g = 1; while(n > 1) { g =...
true
f8e4340ae09af14aa6181172eb089586d7a4858f
JavaScript
wyang342/int-o-meter
/src/components/BigSearchComponent.js
UTF-8
871
2.71875
3
[]
no_license
import { Form, FormControl, Button } from 'react-bootstrap'; import { useState } from 'react'; function BigSearchComponent({ populateDeadData }) { const [summoner, setSummoner] = useState(''); const handleFormSubmit = async (event) => { event.preventDefault(); const summonerName = event.target...
true
8435981770030f154cc8e3e6d70095fbec1f6455
JavaScript
TiagoR98/LTW_Project
/js/commentVotes.js
UTF-8
2,442
3.28125
3
[]
no_license
//execute AJAX up/downvote everytime user changes order document.body.addEventListener('DOMSubtreeModified', updateElements); window.addEventListener('load', updateElements); let commentDownVoteButtons,commentUpVoteButtons; function updateElements(){ commentDownVoteButtons = document.querySelectorAll('.commentDownVot...
true
cd4e9a05f88df52a1510200b8bccebef32e5012c
JavaScript
dzakki/clonerp
/src/cli.js
UTF-8
2,310
2.734375
3
[ "MIT" ]
permissive
import arg from 'arg'; import inquirer from 'inquirer'; import { updateConfig, readRepos, cloneRepos, helpFeedback } from "./functions"; import { questions } from "./variables"; function parseArgumentsIntoOptions(rawArgs) { const args = arg( { '--help': Boolean, '-h': '--help' }, ...
true
f2d33ef2f0cf9e5f9ad6497a41c30d1d992a94bd
JavaScript
ebarahona/review-aggregator
/server/apiHelpers/utils.js
UTF-8
4,138
2.734375
3
[]
no_license
const organizePlacesData = ({ foursquareDetails, googleDetails, yelp }) => { const reviewSiteData = { name: getProp(yelp, 'name'), address: getAddress(yelp), distance: getDistanceInMiles(yelp), phone: getProp(yelp, 'display_phone'), photoUrl: getPhoto(foursquareDetails), description: getProp(f...
true
d4a80380dcb343bc9c244b91e7968275eb191ae2
JavaScript
muhamedsuhail/Network
/network/static/network/js/base.js
UTF-8
7,660
2.765625
3
[]
no_license
var user = document.querySelector('#user').innerHTML; var csrftoken = Cookies.get('csrftoken'); //Django csrf validation var click_event = (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) ? 'touchstart' : 'click'; var path=window.location.pathname; document.addEventListener('DOMContentLoaded', () => { ...
true
fab9a113dce1d1c549af53e79e875c9f461a249e
JavaScript
charyorde/y-maven-repo
/scripts/jivetasklist.js
UTF-8
7,281
2.546875
3
[]
no_license
/*jslint browser:true */ var JiveTaskList = $Class.extend({ /* * Initialize the JiveWidgets object. * @containerID The id of the task list container * @completeURL The url to mark a task complete * @incompleteURL The url to mark a task incomplete * @takeURL The url to take an unassigned t...
true
229fd336c026ed7762e247fe0203e0bedf5d31d7
JavaScript
kiraxe/miel
/resources/js/api/getFormData.js
UTF-8
392
2.625
3
[]
no_license
export const getFormData = (elements, method) => { let formData = new FormData(); for(let key in elements) { if (key === 'option') { formData.append(key, JSON.stringify(elements[key])); } else { formData.append(key, elements[key]); } } if (method) { ...
true
1ed20e3a70e603deb89579579e5cd67285fcb8f3
JavaScript
heoshhush/Simple-Counter
/main.js
UTF-8
628
3.265625
3
[]
no_license
const body = document.querySelector('body'); const count = document.querySelector('.count'); const buttons = document.querySelector('.buttons'); let countNum = 0; buttons.addEventListener('click', (event) => { const target = event.target; if(target.matches('.decreaseBtn')){ countNum = -...
true
12e74ad006d2f200b5909529b0e2fa62db0bcee7
JavaScript
did0sh/Softuni-Education
/Software-Technologies/JavaScript Basic Syntax - LAB/src/p05_SymetricNumbers.js
UTF-8
467
3.421875
3
[]
no_license
function symetric(num) { let count = Number(num[0]); let result = ""; for (let i = 1; i <= count; i++) { if (isSymetric(i.toString())) { result += i + " "; } } console.log(result); function isSymetric(str) { for (let k = 0; k < str.length / 2; k++) { ...
true
ad88885bf4b4357d896cf8906a2ef6e1ddd08667
JavaScript
CodeWorld21/weather-app
/src/script.js
UTF-8
4,465
3.53125
4
[]
no_license
function formatTime(time) { let hours = time.getHours(); if (hours < 10) { hours = `0${hours}`; } let minutes = time.getMinutes(); if (minutes < 10) { minutes = `0${minutes}`; } return ` | ${hours}:${minutes}`; } function formatDate(date) { let months = [ "January", "February", "Mar...
true
da053a49f550996e0eb427143016cb42f7e886ab
JavaScript
hucklebarry/sorting
/bubblesort.spec.js
UTF-8
677
3.171875
3
[]
no_license
describe('Bubble Sort', function(){ beforeAll(function () { spyOn(window, 'swap').and.callThrough(); }); it('handles an empty array', function(){ expect( bubbleSort([]) ).toEqual( [] ); expect( window.swap.calls.count() ).toEqual( 0 ); }); it('handles an array of one item', function(){ ...
true
85cc66d387acc1ff33dd266aa5ec715a1a4148af
JavaScript
badjatya/Mern
/client/src/pages/admin.js
UTF-8
497
2.53125
3
[]
no_license
import React, { useState, useEffect } from "react"; const Admin = () => { const [users, setUsers] = useState([]); const handleClick = async () => { const res = await fetch("/users"); const data = await res.json(); setUsers(data); }; useEffect(() => { handleClick(); }); return ( <div ...
true
0b36f4f3368a9beef12fe73746c7fa92c4fcd736
JavaScript
frankieliu/problems
/JS/ES6/src/main.js
UTF-8
592
2.640625
3
[]
no_license
// import everything as methods or properties of an object // import _ as h from './helpers'; // and then use them // const displayTotal = h.formatPrice(5000); // Or import everything into the module scope: // import * from './helpers'; // const displayTotal = addTax(1000); // I'd recommend against this style because...
true
35af5db72bb64e13b790cb24a5b7d0abc2802076
JavaScript
kvasilitsev/frontend-project-lvl1
/src/games/calc.js
UTF-8
829
3.0625
3
[]
no_license
import { cons } from '@hexlet/pairs'; import { getRandomInt } from '../functions.js'; import gameLogic from '../index.js'; const rules = 'What is the result of the expression?'; const gameData = () => { let correctAnswer; let question; const operand1 = getRandomInt(); const operand2 = getRandomInt(); const ...
true
7be87cbe498605772802cf8e1835fd5e2d57bf5e
JavaScript
mi2lab/gesturewiz
/public/.common/require.js
UTF-8
4,513
2.75
3
[]
no_license
const require = function (scripts, synchronous) { if (scripts.constructor !== Array) { scripts = [scripts]; } const head = document.getElementsByTagName("head")[0]; const requireSync = function(i, scripts, onload, onerror) { if (!scripts.length) { onload(); } ...
true
5ab36c83cc7655b9c788e2417cadd7724698289c
JavaScript
Luoyuda/js-demo
/refactoring/6.6.js
UTF-8
532
2.96875
3
[]
no_license
/* * @Author: xiaohuolong * @Date: 2021-08-07 16:35:37 * @LastEditors: xiaohuolong * @LastEditTime: 2021-08-07 16:43:06 * @FilePath: /js-demo/refactoring/6.6.js */ let defaultOwnerData = { firstName: 'Mt', lastName: 'Fl' } function defaultOwner(){ return Object.assign({}, defaultOwnerData) } function ...
true
b6d87e80f086b3f68f971316234f879bcee9322a
JavaScript
coderoadpl/frontend--tests-async--project-0.1
/src/App.test.js
UTF-8
2,776
2.84375
3
[]
no_license
import App from './App' const MOCK_USER_1 = { avatar: 'https://randomuser.me/api/portraits/thumb/men/36.jpg', name: 'Mateusz Choma' } const MOCK_USER_2 = { avatar: 'https://randomuser.me/api/portraits/thumb/men/36.jpg', name: 'Code Road' } const MOCK_USERS_1 = (new Array(10)).fill(MOCK_USER_1) const ...
true
46ea0f94a7175c9d031149c8a6875cbc316becbf
JavaScript
gabrielcraveiro/MEAN-Estudos
/IntroToExpress/ExpressAssignment/app.js
UTF-8
786
2.890625
3
[]
no_license
var express = require('express'); var app = express(); // Rotas app.get('/', function(req, res) { res.send('Bem vindo!'); }) app.get('/speak/vaca', function(req, res) { res.send('A vaca faz mu!'); }) app.get('/speak/cachorro', function(req, res) { res.send('O cachorro faz au!'); }) app.get('/speak/porco', fun...
true
03932df12433b5b436ed874df6d8a07a71229ea7
JavaScript
websites24com/JavaScriptChallenge15
/challenge15.js
UTF-8
2,150
4.34375
4
[]
no_license
// Pool application /*Create a method called 'registerNewAnswer' on the 'poll' object. The method does 2 things: 1.1. Display a prompt window for the user to input the number of the selected option. The prompt should look like this: What is your favourite programming language? 0: JavaScript 1: Python 2: Rust 3: C++ (W...
true
5a394d2c8c233ab81d10506070b6216b8cf25cd6
JavaScript
Connor-Knabe/holka-garage
/services/homeAway.js
UTF-8
5,083
2.515625
3
[]
no_license
module.exports = function(logger, login, messenger, messengerInfo, io, options) { var Status = { personOneAway: false, personTwoAway: false, personOneTime: new Date(), personTwoTime: new Date(), temporaryEnableGuestIsHome: options.defaultGuestIsHome, isAway: ()=>{return Status.personOneAway && Status.pers...
true
1554576bc486242e0dc0e99d6323afde088dfdb3
JavaScript
zsbahtiar/sbit-test
/4_logic/index.js
UTF-8
1,164
3.890625
4
[]
no_license
/** * @Input @arr * ['kita', 'atik', 'tika', 'aku', 'kia', 'makan', 'kua'] * * @Output Expected is arr of object by group a.k.a @anagram * [ ["kita", "atik", "tika"], ["aku", "kua"], ["makan"], ["kia"] ] */ /* init input */ const input = ["kita", "atik", "tika", "aku", "kia", "makan", "kua"]; /** * * ...
true
668f6b6ffcdd84789c2032eea6f30c03fb562d4a
JavaScript
psfonseka/Mock-TA-Badmovies
/server/models/movieModel.js
UTF-8
2,909
2.671875
3
[ "MIT" ]
permissive
//SELECT one db to work with //For SQL const sqlDb = require('../../db/sql'); //For Mongo const mongoDb = require('../../db/mongodb'); const mongoose = require('mongoose'); module.exports = { getSearch: (data, genre, callback) => { console.log("get search down heeeeere"); let info = data.map((item...
true
0c096f23b3c8a4d0030c601e07459acb9b3aa187
JavaScript
JessieHelloWorld/inquirer-input-table
/index.js
UTF-8
5,728
2.8125
3
[]
no_license
const chalk = require("chalk"); const cliCursor = require("cli-cursor"); const Base = require("inquirer/lib/prompts/base"); const Choices = require("inquirer/lib/objects/choices"); const observe = require("inquirer/lib/utils/events"); const Table = require("cli-table"); const { map } = require("rxjs/operators"); cla...
true
700906e4fd2ebf235520e59163f9416d841a5ddf
JavaScript
arobillard/bohnanza
/src/utils/deck.js
UTF-8
315
3.015625
3
[]
no_license
import { cardList } from '../data/cards'; export function shuffle(arr) { return arr.sort(() => Math.random() - 0.5); } export function generateDeck() { const deck = []; cardList.forEach((type, index) => { for (let i = 0; i < type.count; i += 1) { deck.push(index); } }); return deck; }
true
1efafc522488edba6518f5df040b326ec74a4959
JavaScript
DavidTunnell/algorithm-activities
/CamelCaseSeperation.js
UTF-8
2,212
4.125
4
[]
no_license
/** * https://app.codesignal.com/test/gF9pmS5QLTmmpJ4cg/task/Wqvd3kZMT4DkXY9gq * You are developing a new programming language and currently working on variable names. You have a list of words that you consider to be good and could be used for variable names. All the strings in words consist of lowercase English let...
true
08405f31a42744bdf88db087358c19e6218b8a47
JavaScript
tgajdoski/my-thc-guide
/handler.js
UTF-8
2,434
2.625
3
[]
no_license
'use strict'; var Alexa = require('alexa-sdk'); const databaseManager = require('./databaseManager'); var APP_ID = 'amzn1.ask.skill.30b8e1d7-4cf3-4f84-897c-839a9727de67'; var SKILL_NAME = "My THC guide"; var GET_FACT_MESSAGE = "Here's your cannabis fact: "; var HELP_MESSAGE = "You can say tell me a cannabis fact, or,...
true
15443c9d553f187456f3a0193e759fdd3f167300
JavaScript
ranst91/angularjs-starting-kit
/gulpfile.js
UTF-8
3,192
2.53125
3
[ "MIT" ]
permissive
'use strict'; //Some dependencies var gulp = require('gulp'); var connect = require('gulp-connect'); //run a dev server var open = require('gulp-open'); //open a url in a web browser var babel = require('gulp-babel'); var concat = require('gulp-concat'); // Add files together var rename = require('gulp-rename');...
true
0e5d4ec6adb26a98c0ca2d66a433be118c4edffe
JavaScript
DavidBarringerQA/TDL-Project
/src/main/html/js/index.js
UTF-8
8,137
2.875
3
[]
no_license
(() => { let list = document.querySelector("#list"); let description = document.querySelector("#description"); let priority = document.querySelector("#priority"); let time = document.querySelector("#time"); time.min = new Date().toISOString().split(".")[0]; let submitButton = document.querySelector("#submit...
true
508ce36d290d25b9dceaa29b47e183c9df3e8a1b
JavaScript
isavlex/barber
/markup/components/navigation/sandwich/sandwich.js
UTF-8
1,085
2.515625
3
[ "MIT" ]
permissive
function removeMenu() { let sandwich = document.querySelector('.sandwich'); sandwich.classList.remove('sandwich--active'); let nav = document.querySelector('.nav'); nav.classList.remove('nav--active'); let navActivePage = document.querySelector('.nav__active-page'); navActivePage.classList.remov...
true
cea7c75a794d71c8d09e4e9ae86501ab30f7ccc3
JavaScript
lee-hyunsu/javascript_example
/Chapter2/10.js
UTF-8
429
3
3
[]
no_license
console.log('JavaScript'.slice(0, 4)); //Java console.log('JavaScript'.slice(0)); //JavaScript console.log('JavaScript'.substring(0, 4)); //Java console.log('JavaScript'.substring(0)); //JavaScript console.log('나의 노트북'.slice(3, -1)); //노트 console.log('나의 노트북'.slice(-6, -4)); //나의 console.log('나의 노트북'.substring(3, -3)...
true
cd1c58357d7ec2cb865d10ee11d559351d34736c
JavaScript
beviz/jquery-smart-calendar
/jquery.smart-calendar.js
UTF-8
16,365
2.671875
3
[]
no_license
/** * 支持鼠标滚轮、键盘方向键控制与键盘录入的时间插件 * * dependent: jquery & jquery.mousewheel & jquery.fieldselection * * @author Bevis.Zhao * @time 2011/5/28 1:15PM */ (function(){ /** * Fill string to left , if the owner's length not enough * Default fill 0 * @param {Object} shouldLength * @param {Object} fill */ ...
true
cbfaf1520d628fc034e6ad71bf78dc56df666a85
JavaScript
hellej/travel-time-map
/src/reducers/zonesReducer.js
UTF-8
2,388
2.515625
3
[ "MIT" ]
permissive
import { turf } from '../utils/index' import { updateKmTargets, updateMinTargets, setTransMode } from './targetsReducer' const circleRadiuses = [1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 11000, 12000, 13000, 14000, 15000, 16000, 17000, 18000, 19000, 20000] const initialTtZones = { mapMode: 'dist...
true
f2135712369f0257e0ebe84953780c92ee2a2138
JavaScript
simanim/javascripts_programs
/functional/quadratic.js
UTF-8
1,173
3.375
3
[]
no_license
/****************************************************************************** * Execution : default node cmd> node quadratic.js * * Purpose : printing the roots of the quadratic equation, a*x*x + b*x + c * * @description * * @file : quadratic...
true
530917fbb87028f045165da928dbff94d1970f62
JavaScript
emilwallgren/numbers-2-text-converter
/converter.js
UTF-8
2,856
3.609375
4
[]
no_license
function getNumber() { var inputNumber = document.getElementById("number").value; console.log("Input: " + inputNumber); console.log("Inputlength: " + inputNumber.length); inputNumber.toString(); var length = inputNumber.length; if (length == 2 && inputNumber > 19) { var firstNumber = inputNumber.charAt(...
true
da43a2ff80787ed2fc4e9559fa8b3eadbb79c0d8
JavaScript
ishrathnayeem/FullStackJava
/My Project/Frontend/Mcitdemo/Login/login.js
UTF-8
767
2.78125
3
[]
no_license
function signin() { var email = document.getElementById("email").value; var password = document.getElementById("password").value; signinDetails = { email: email, password: password } const signURL = "http://localhost:8080/login"; const Http = new XM...
true
88f87dcdcbe0ccf8f9e13b94461e5b59b55f121a
JavaScript
Ekskursantas/Gutenberg
/src/main/webapp/js/placeholderValue.js
UTF-8
843
2.8125
3
[ "MIT" ]
permissive
$(function () { $("#option").on("click", function () { $("#searchItem").prop("disabled", false); if ($(this).val() === "1") { $("#searchItem").attr('placeholder', 'Enter one of the books authors'); } else if ($(this).val() === "2") { $("#searchItem").attr('placeholde...
true
347e097d7c2fe472919b0f676a4bdaf49d78f376
JavaScript
eduardoramos1/teste-front-metasix
/src/context/FAQ/FAQReducer.js
UTF-8
1,438
2.609375
3
[]
no_license
import { GET_QUESTIONS, ADD_QUESTION, FILTER_QUESTIONS, CLEAR_FILTER, DELETE_QUESTION, UPDATE_QUESTION, SET_CURRENT } from "./../Types"; export default (state, action) => { switch (action.type) { case GET_QUESTIONS: return { ...state, questions: action.payload.results }; case ADD_QUESTION: ...
true
7769898e44b3b66ef880dfb5702a2ad93181b839
JavaScript
Lavieenrose99/Ivan_code_house
/JS/设计模式/singleton.js
UTF-8
1,565
3.671875
4
[]
no_license
/* * @Author: your name * @Date: 2021-03-08 16:48:01 * @LastEditTime: 2021-03-08 17:38:04 * @LastEditors: Please set LastEditors * @Description: In User Settings Edit * @FilePath: /ivan个人练习代码/JS/设计模式/singleton.js */ // 定义一个类 function Singleton(name) { this.name = name; this.instance = null; } // 原型扩展类的一个...
true
3a01d9869430fc6b8ef2cdf8c30767e25f2a309a
JavaScript
tanvirt/Driving_Sim
/Client/Driving_Sim/js/Canvas.js
UTF-8
7,536
2.609375
3
[]
no_license
function Canvas(client, elementId) { if(elementId == undefined) GLCanvas.call(this, this._createCanvasContainerElement().id); else GLCanvas.call(this, elementId); this._client = client; this._drawableList = new DrawableList(this.getCamera()); this._hdriRoom = null; thi...
true
a1dde75808f8a769812c6b34c3cfa61fe8bc60d4
JavaScript
pds-nyu-idm-cc/DM-GY-6063-Creative-Coding-Spring-2019-Stearns
/student_work/wyu/challenge_week6/pj5_challenge1/Toggle Button 2/sketch.js
UTF-8
601
3.25
3
[]
no_license
var r = 50; var d; var c ; var mouseIsclicked = false; function setup() { createCanvas(800, 600); background(255); } function draw() { strokeWeight(2); stroke(0); // distance between the ball and the mouse d =dist(width/2, height/2, mouseX, mouseY); // active color if (d < r) { c = 200; // the ...
true
cd96d02d00ac69845dc5d22a1763d2fa27b20506
JavaScript
tobacco91/hybird-menu
/src/common/bootstrap/global.js
UTF-8
448
2.78125
3
[]
no_license
/** * this file will be loaded before server started * you can define global functions used in controllers, models, templates */ /** * use global.xxx to define global functions * * global.fn1 = function(){ * * } * */ global.format = function(time) { var date = new Date(time); return d...
true
526d832752521251133351e9326e181958a6a894
JavaScript
loverflower/forkify-evgen-app
/src/js/views/view.js
UTF-8
2,990
2.53125
3
[]
no_license
import icons from 'url:./../../img/icons.svg'; export default class View { newDomer; data; render(data, cond = true) { if (!data || (Array.isArray(data) && data.length === 0)) return this.renderError(); this.data = data; console.log(this.data); const markUp = this._generateMarkup(); if...
true
c1d0bdb529b84d63a7c3c77d71567a2f7ed1a5b2
JavaScript
jongsoojong/ChatTesting
/main.js
UTF-8
3,995
2.546875
3
[]
no_license
var socketApp = angular.module('socketApp', ['ui.router']); //CONTROLLERS socketApp.controller('chatController', function($scope, $state, $http, $location, socket, userInfo, getChatData){ var vm = this; vm.msgs = []; var thisDate = new Date; vm.messagePrompt = userInfo.currentUsername + " (" + thisDate.to...
true
63a2f21c35815a84326a4ad108ed01ea22052309
JavaScript
ashmehek/jQuery
/index.js
UTF-8
623
2.59375
3
[]
no_license
$("h1").addClass("big-title margin-50"); // $("button").text("Dont Click Me"); // $("button").html("<em>Dont Click Me</em>"); // console.log($("img").attr("src")); // $("a").attr("href", "https://www.yahoo.com"); // // $("button").click(function(){ // $("h1").css("color", "red"); // }) // $(document).keypress(fun...
true
68ec5a0c2152b49bbcc5fb3bc1d759762a03ff2c
JavaScript
stevemckinney/iamsteve
/pages/api/emailoctopus.js
UTF-8
1,098
2.578125
3
[ "MIT" ]
permissive
// eslint-disable-next-line import/no-anonymous-default-export export default async (req, res) => { const { email, name, source } = req.body if (!email) { return res.status(400).json({ error: 'Email is required' }) } try { const API_URL = process.env.EMAILOCTOPUS_API_URL const API_KEY = process.env...
true
76d47da458556858d1f664b9b888cda6a08dd72c
JavaScript
CoderRadwan/radio_player
/script/color.js
UTF-8
1,594
3.234375
3
[]
no_license
class Color{ constructor(){ this.color1 = document.getElementById("color1"); this.color2 = document.getElementById("color2"); this.color3 = document.getElementById("color3"); this.color4 = document.getElementById("color4"); this.color1.addEventListener("click" , ()=>...
true
c1a3a745afd35a709062a59fe88c83262f9adc83
JavaScript
JarvisZhangUTA/HumbleRestaurant
/public/js/main.js
UTF-8
4,506
2.609375
3
[ "MIT" ]
permissive
$(function() { var pages = parseInt($('#pages').val()); var curPage = 1; var types = ['','danger','warning','info','primary','success']; if(curPage < pages){ var content = ''; content += "<div id='footer_card' class='btn card card-inverse card-primary text-center' style='height: 160px'>...
true
3009bafd2dd953dbaff7311eb5e8873ea6d0eed1
JavaScript
mimoccc/webkit-greeter
/old/dc_maps/opera.js
UTF-8
1,549
2.578125
3
[]
no_license
/* * This file contains a device control map keycodess * * note: * keys as defined in SDK. For Opera testing only, remove after testing. */ var KBD_MAP = new function () { this.id = 'opera'; // key values this.keys = []; this.keys[0] ='VK_UNMAPPED'; this.keys[37] ='VK_LEFT'; this.keys[39] ='VK_RIGHT...
true
f8828c991f4ed4619eeed78e60ddfb6a90aa2623
JavaScript
KunBaoLin/coding-dojo-hw
/example/likes/Lin_KunBao_likes/likes.part1/script.js
UTF-8
234
3.140625
3
[]
no_license
console.log("page loaded..."); var count = 9; var countElement = document.querySelector("#counts"); function add1(){ count ++; countElement.innerText = count + " Likes"; console.log(count); console.log("it works") }
true
1568d6929e5810b6867bb260541efece0a8c6f01
JavaScript
BohanHsu/leetcode
/largest_number.js
UTF-8
628
3.21875
3
[]
no_license
/** * @param {number[]} num * @return {string} */ var largestNumber = function(num) { var filtered = num.filter(function (elem) { return elem === 0 ? false : true }) if (filtered.length === 0) { return '0' } num = num.map(function (elem) { return elem.toString() }) num.sort(function (num...
true
77640f011cb2e611253ac5a253fdc3e06df96be7
JavaScript
ahmetcanozcan/eago
/core/engine/js/bootstrap/src/test/main.js
UTF-8
518
2.71875
3
[ "Apache-2.0" ]
permissive
var describe = (function () { function getAssertFunction(testName) { return function (cond) { if (!cond) { console.error("TEST FAILED ", testName); } else { console.log("TEST PASSED ", testName); } }; } function getTestFunction(desc) { return function testFunction(de...
true
027b8e1841a757d66c1137b0d28eb814df4361d0
JavaScript
robin-drexler/webperfchallenge-psi-generator
/spec/unit/retry-promise-spec.js
UTF-8
1,582
2.6875
3
[]
no_license
const retryPromise = require('../../lib/retry-promise'); describe('retryPromise', () => { it('should retry failed promises then fail', (done) => { let rejectingPromiseSpy = jasmine.createSpy('promise').andCallFake(() => { return Promise.reject(); }); retryPromise(rejectingProm...
true
cf1b9c53dfbf6759788d6735820a42346d047dd8
JavaScript
john-winko/CFBP_Hundo
/js/site.js
UTF-8
1,183
4.5
4
[]
no_license
//get starting values from the screen function getValues() { let startValue = document.getElementById("startValue").value; let endValue = document.getElementById("endValue").value; startValue = parseInt(startValue); endValue = parseInt(endValue); if (Number.isInteger(startValue) && Number.isInteg...
true
787d38d705530abad7b4c24554546ff146d5e506
JavaScript
MaelKKV/chat-1-JS-FullStack
/src/public/main.js
UTF-8
1,586
2.8125
3
[]
no_license
$(function () { const socket = io.connect(); //Get DOM Elements from index.html const $messageForm = $('#message-form'); const $messageBox = $('#message'); const $chat = $('#chat'); //Get DOM Elements from nickForm const $nickForm = $('#nickForm'); const $nickError = $('#nickError'); const $nicknameWr...
true
0ab8c582d59732d805225734303675972c59eb9b
JavaScript
tsstric/homepage
/random.js
UTF-8
154
2.609375
3
[]
no_license
exports.randomInt = function(min, max) { min = parseInt(min); max = parseInt(max); return Math.floor(min + Math.random() * (max - min + 1)); }
true
62c5bfd3043cca1aaac69f48f74e73bde70a7bd2
JavaScript
Dinu98/Udemy-Web-Developer-Bootcamp-2020
/G.Handling-Errors-In-Express/index.js
UTF-8
768
2.65625
3
[]
no_license
const express = require('express'); const app = express(); const morgan = require('morgan'); const customError = require('./CustomError'); const verifyPassword = (req,res,next) =>{ const { password } = req.query if(password === "Pass"){ return next(); } else { throw new customError(401,"You...
true
416ceb46c56c20200d506aa3f93bbd7e33a05589
JavaScript
0Z3R00/ProvaTI
/back_end_ejs/src/rotas/Nome/index.js
UTF-8
2,405
2.59375
3
[]
no_license
const roteador = require('express').Router() const NaoEncontrado = require('../../error/NaoEncontrado'); const Nome = require('./Nome'); const DAONome = require('./DAONome'); roteador.get('/', async (requisicao, resposta) => { const resultados = await DAONome.listar(); filtrar(resultados); resposta....
true
448c5e83ae1c9a7740ddff1d22c6acab398b4b20
JavaScript
kostochka120/application_programming
/method_map/task3/script.js
UTF-8
161
3.234375
3
[]
no_license
let arr = ["25", "100", "97","48", "36"]; let sqrt_arr = arr.map(function(int){ return int.split('').reverse().join(""); }); console.log(sqrt_arr);
true
c6e1db8521af335b6cb8bcb3ee83082fca2fc6b0
JavaScript
msartintarm/music-site
/src/render.js
UTF-8
442
2.578125
3
[]
no_license
/* (c) 2016. All rights reserved. Render methods */ /* @param boards: data for boards @return: DOM representation of boards */ let renderBoards = (boards) => { for (let i = 0; i < 10; ++i) { console.log("yo"); } return boards; }; /* @param boards: data for dashboard @return: DOM representation of dashboard...
true
07db77f7c9ece2a478e1151f0df51ba49f68b0cf
JavaScript
corycaywood/chrome-mac-right-click-fix
/fix-right-click.js
UTF-8
273
2.828125
3
[]
no_license
var timeout = true; document.onmousedown = function(e) { if ( timeout && (e.button == 2 || e.ctrlKey == true) ) { timeout = false; setTimeout(function(){ timeout = true; }, 50) } } document.onselectstart = function(e) { if (!timeout) e.preventDefault(); };
true
36e8b8504f55adcc27d77116ee6fb84a13ad5541
JavaScript
LMHuong/nodeapi
/validator/index.js
UTF-8
1,555
2.734375
3
[]
no_license
exports.createPostValidator = (req, res, next) => { //title validation req.check('title', "Write a title for your post.").notEmpty(); req.check('title', "Title must be from 4 to 150 characters.").isLength({ min: 4, max: 150 }); //body validation req.check('body', "Write something for your post.").notEmpty(); ...
true
176a632fe9df2265a04a0bf166f58284be9a027f
JavaScript
Battlegriffin/jslek
/conditionals/10-ternary-operator.js
UTF-8
352
3.953125
4
[]
no_license
// ternary operator // condition ? true : false // console.log(3 === 2 ? "it is true" : "it is false"); // var email = "somethin@ok.com"; // if (email === "somethin@ok.com") { // console.log("you have access"); // } else { // console.log("please sign up"); // } var email = "somethin@ok.com"; console.log(email...
true
760d1c4a59067c1a173b62c09f8381cb76dacc26
JavaScript
harynp/hacktiv8
/PHASE 0/Week-4/1. Senin/Division.js
UTF-8
362
3.34375
3
[]
no_license
function Division(num1,num2) { var low = 0; var high = 0; var indexMax = 0; if(num1 < num2 ){ low = num1; high = num2; } else { low = num2; high = num1; } for(i=1;i<=low;i++){ if(low%i===0 && high%i===0){ indexMax = i; } } return (indexMax); } // keep this...
true
58aa004aca0f13cb641ecbeb0263d2449b65f5c1
JavaScript
aishuharish/Car-inventory
/src/components/AddNew/AddNew.js
UTF-8
5,499
3.03125
3
[]
no_license
//Component for creating new form to add new vehicle detail //Uses reusable radio button import React, { useState, useEffect } from "react"; import CarDropdown from "./CarDropdown"; import CurrencyInput from "react-currency-input-field"; //Displays the field in currency format as user enters import RadioBtn from "./Ra...
true
2373f7f4d897144395c9e656a0ffe06e1885f025
JavaScript
agungpribadi7/belajar-dasar-backend-dicoding
/handler.js
UTF-8
5,126
2.796875
3
[]
no_license
const {nanoid} = require('nanoid'); const {books} = require('./books.js'); const addBooks = (request, h) => { const id = nanoid(16); const {name = '', year = 0, author = '', summary = '', publisher = '', pageCount = 0, readPage = 0, reading = false} = request.payload; if (name === '') { return h.response...
true
cbacd8dc0476d8edd95c6db88a480bcabf7b6a5e
JavaScript
bharani-palani-zz/D3Charts
/charts/verticalstackedbarchart/verticalstackedbarchart.js
UTF-8
3,152
2.546875
3
[]
no_license
import React, { Component } from "react"; import * as d3 from "d3"; import PropTypes from "prop-types"; import "./verticalstackedbarchart.sass"; class VertStackedBarChart extends Component { constructor(props) { super(props); this.state = { id: this.props.id, chartData: this.props.chartData, ...
true
ac0ebda2d435ecab181fa33bf8a8ba10cf76b1ea
JavaScript
aibric1407/bitconex
/common/models/product.js
UTF-8
741
2.578125
3
[]
no_license
"use strict"; module.exports = function(Product) { /** * @description Fetch all products. Include tech and device details * @method allProducts * @example GET http://localhost:3000/api/Products/list * @param cb callback function * @returns subscriptions list of active subscriptions for all users */...
true
91e36217f7df99132a6e70815d6065c9999aa8e0
JavaScript
Kohei-1729/furima-29186
/app/javascript/category.js
UTF-8
473
2.84375
3
[]
no_license
function showCategoryList(){ const categoryBtn = document.getElementsByClassName("category-list")[0] const categoryList = document.getElementById("pull-down") categoryBtn.addEventListener('click', function(){ if (categoryList.getAttribute("style") == "display:none;"){ categoryList.removeAttribute("styl...
true
daacc1c26777a16cbd6d29042bd2b1e0f3f5e60a
JavaScript
atchai/eyewitness-ui
/lib/hippocamp/lib/workflow/miscellaneous.js
UTF-8
3,918
2.84375
3
[]
no_license
'use strict'; /* * WORKFLOW: MISCELLANEOUS * Functions that don't fit into any other sub module of the Workflow Manager. */ const extender = require(`object-extender`); const utilities = require(`../modules/utilities`); /* * Returns just the base flow URL without the action index. */ const __getBaseFlowUri = fu...
true
247c04f062f6224b862f4bba617c54d0ae1ab8c4
JavaScript
ZumbiDoPython/apitakebot
/src/controllers/blip.js
UTF-8
641
2.71875
3
[]
no_license
const axios = require('axios'); const goRepo = async (req, resp) => { try { const { data } = await axios.get('https://api.github.com/users/takenet/repos',{params:{"sort": "created","direction": "asc" }}) const formatDate = data.filter(repo => repo.language == 'C#') let arr = [] formatDate.map(...
true
2d170a772e3c377b7824fc68a9f26b65cef11a40
JavaScript
dgszabo/problem-solving
/pangrams.js
UTF-8
449
3.453125
3
[]
no_license
// PANGRAMS STRING MANIPULATION PROBLEM // HackerRank https://www.hackerrank.com/challenges/pangrams/problem function pangrams(s) { let alphabet = new Set(['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']) for(let i = 0; i < s...
true
f666b8c12b0ae8407dc1efaf40923c7e9930b7e8
JavaScript
guillaumequillet/wms
/public/js/incomingForm.js
UTF-8
6,765
2.6875
3
[]
no_license
class IncomingForm { constructor() { let that = this; // fix around Jquery "this" handling this.lineNumber = $('.orderRow').length; $('#feedbackIncomingForm').hide(); $('.orderRow').each(function() { that.addDeleteEvent($(this)); that.addArticleSuggesti...
true
2616d6a921a1b0055f880f9d43295544f6e9bc7c
JavaScript
Dawid-Kolankowski/designo-website-frontend-mentor-challenge
/header.js
UTF-8
745
2.671875
3
[]
no_license
const btnHamburger = document.querySelector('#btnHamburger'); const header = document.querySelector('.header'); const body = document.body; const y = window.scrollY; const overlay = document.querySelector('.overlay'); btnHamburger.addEventListener('click', function () { console.log(overlay); header.classList.toggle...
true
451c28da29f6cfe13cf494ed7c4d66aadc4cdb76
JavaScript
cecpoool/DGHA_graphqlReviewTest
/resolvers.js
UTF-8
1,849
2.796875
3
[]
no_license
class User { constructor(userID, { username, email }) { this.userID = userID; this.username = username; this.email = email; } } class Business { constructor(busID, { name, address, rating }) { this.busID = busID; this.name = name; this.address = address; this.rating = rating; } } c...
true
0520d9d153262c4ce8db089576c68804a291ad0b
JavaScript
VVoev/Telerik-Academy
/06.JavaScript/Operators and Expressions/Point in a Circle.js
UTF-8
354
3.765625
4
[ "MIT" ]
permissive
function checkIsPointInCircle(coordinates) { let x = Number(coordinates[0]); let y = Number(coordinates[1]); let distance = Math.sqrt((x - 0) * (x - 0) + (y - 0) * (y - 0)).toFixed(2); if (distance <= 2) { console.log("yes " + distance); } else{ console.log("no " + distance); ...
true
b96d0d87584d39fd1d260d46595df885343f610a
JavaScript
aalbaharnah/MyWeatherApp
/app/app.js
UTF-8
1,838
2.640625
3
[]
no_license
var app = angular.module("MyWeatherApp", []); app.controller("MyWeatherController", function ($scope, $http) { // Function to search by city name $scope.cityName = ''; $scope.search = function () { $http.get('http://api.apixu.com/v1/current.json?key=852bf53e45aa4d15a8c140018190901&q=' + $scope.ci...
true
883425a57537f36dba593e08550ab72568da8ac2
JavaScript
vmurali100/janardhan_reddy
/Javascript/JS 6_CRUD/update.js
UTF-8
1,302
2.78125
3
[]
no_license
var index function editUser (i){ index=i document.getElementById("create").style.display="none" document.getElementById("update").style.display="block" document.getElementById("fName").value=users[i].fName document.getElementById("lName").value=users[i].lName document.getElementById("email").va...
true
afd2d4531ff5855e9d7f7f2b5e9e26812aa319d7
JavaScript
upei/ticker
/assets/helpers/xml.js
UTF-8
270
2.78125
3
[ "BSD-3-Clause" ]
permissive
function createXMLFromString (string) { var xmlParser, xmlDocument; try { xmlParser = new DOMParser(); xmlDocument = xmlParser.parseFromString(string, 'text/xml'); return xmlDocument; } catch (e) { output("Can't create XML document."); return null; } }
true
0dcc126729a1428c7c5132526aed336d15a3e8bc
JavaScript
PascalF44/react3
/src/components/App.jsx
UTF-8
1,879
2.5625
3
[]
no_license
import React, { Component } from 'react'; import '../style/App.css'; import MesureMain from "./views/MesureMain"; import MesureAnnexe from "./views/MesureAnnexe"; class App extends Component { constructor(props){ super(props); this.state={ actuel: { heure: '--:--:--', valeur: '--' }, mini: { heure: '--:--:--'...
true
2c154990837139092ac236664796500fcb950f58
JavaScript
drewmarlier/summer-playlist-builder
/js/index.js
UTF-8
1,295
3.234375
3
[]
no_license
$(() => { // Variables let database = firebase.database(); let songs = database.ref('songs'); // Create - DOM submit event $('form').on('submit', (event) => { event.preventDefault(); let song = { title: $('#song').val(), artist: $...
true
5966088a9fff34b543d5a42a81ed1041bf548e7a
JavaScript
jasimuddin123/Module----9
/multiCondition.js
UTF-8
444
4.1875
4
[]
no_license
// And Equal (&&==) Multiple Condition var positionSupervisor = false; var salaryRiyal = 5000; if(positionSupervisor == false && salaryRiyal == 5000){ console.log("I will do this job"); } else{ console.log(" I will not do this kind of Job"); } // OR (||) Condition var isMale = true; var age = 33; if(isMa...
true
97ff12d4505f89df5833fd3b2408d1a95261c568
JavaScript
Central-MakeUs/OfMe_Server
/src/app/Diary/diaryDao.js
UTF-8
4,364
2.625
3
[]
no_license
// 연도,월,일로 다이어리 조회 async function selectDiary(connection, userId, createAt) { const selectQuery = ` SELECT DayDiary.id, userId, conceptId, ConceptData.name, title, content, date_format(DayDiary.createAt, '%Y-%m-%d') as createAt FROM DayDiary LEFT JOIN ConceptData ON DayDiary.conceptId ...
true
dac40e03f5289cbcba9fdd6698e82903f4e6f014
JavaScript
pettownik/kamtekbot
/commands/4Fun/ytsuggest.js
UTF-8
947
2.546875
3
[]
no_license
module.exports = { name: "ytsuggest", aliases: ['yt-suggest', 'video-suggest'], category: "serwer", permissions: [], async execute(message, args, Discord, client) { const channel = message.guild.channels.cache.get('813318393649954826'); const suggestion = args.join(' '); if(...
true
299d90d089ec9d3c02b8a83dcc90c7cc69478083
JavaScript
TarunHaridasan/Docusafe-Client
/index.js
UTF-8
2,192
3.25
3
[ "Apache-2.0" ]
permissive
//Get the fingerprint of the browser client function getFingerprint() { return new Promise(function(fulfill, reject) { biri() .then(resp=> { fulfill(resp); }) .catch(err => { reject(err); }) }); } //Print catalogue function print(data) { for (i...
true
1ac388ada4605628d68c9c108af519c99b8cbfe4
JavaScript
nalijagic1/Backend-web-tehnologije
/Spirala4/public/ajaxSortiranje.js
UTF-8
1,059
2.890625
3
[]
no_license
function ucitajSortirano(dan,atribut,callback){ var ajax = new XMLHttpRequest(); ajax.onreadystatechange = function() { if (ajax.readyState == 4 && ajax.status == 200){ callback(JSON.parse(ajax.responseText),null); } else if (ajax.readyState == 4){ callback(null,"Došlo je ...
true
c2bf56f147aac838368064d9416ad13d13b1013b
JavaScript
userJerald/ReactJS_TrainingAtCDI
/src.CodeNiJarce2 (Advanced)/index1.js
UTF-8
7,845
2.625
3
[]
no_license
import React from 'react'; import ReactDOM from 'react-dom'; const products = [ { id: '_apple', name: 'Apple', price: 98, edit: false }, { id: '_banana', name: 'Banana', price: 98, edit: false ...
true
87383f602f0a5ad201465fda571bb64eb76007d9
JavaScript
lunalovecode/todo-list-react
/todo.js
UTF-8
485
3.078125
3
[]
no_license
import React from 'react'; /* TODO: Textbox and new TODO Add checkbox to newly created TODO Automatically add to item count and unchecked count Decrease unchecked count (but not item count) when checkbox is checked Increase unchecked count if checkbox is unchecked On double click, edit text in TODO Press enter ...
true
6e39394908c9fe6d1eda517c8b482bc1241c7ba8
JavaScript
simonhoyos/top-v5
/react/users/src/pages/Create.js
UTF-8
853
2.578125
3
[]
no_license
import React from 'react'; import axios from 'axios'; import Form from '../components/Form'; class Create extends React.Component { state = { name: '', age: 0, loading: true } handleChange = (e) => { const { name, value } = e.target; this.setState({ [name]: value }); } handleSubmit = (e...
true
fe9ff7408b273f3c8ed2b8a926b2b2ee2b112644
JavaScript
RoxsyVq/bicis-locas-lvl2
/js/main.js
UTF-8
3,707
3.578125
4
[]
no_license
var spanNombre = document.createElement("span"); var spanApellido = document.createElement("span"); var spanEmail = document.createElement("span"); var spanContra = document.createElement("span"); var spanC = document.createElement("span"); var spanSel = document.createElement("span"); function nombreN() { var no...
true
dcc08d8562483f81fd09e3e3e4c7f66811ca6b4a
JavaScript
shiveshsingh694/spacex-launch--program
/js/script.js
UTF-8
3,174
2.828125
3
[]
no_license
window.onload = (event) => { $(".loading").addClass("loading"); }; async function getUsers() { let url = "https://api.spacexdata.com/v3/launches?limit=8"; try { let res = await fetch(url); if (res.status === 200) { $(".loading").removeClass("loading"); } return await res.json(); } catch (e...
true