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
779fbae4223dc43dfd198bc7c7f2c206be3611c3
JavaScript
Raynos/jsonml-walk
/test/index.js
UTF-8
6,602
2.640625
3
[ "MIT" ]
permissive
var test = require("tape") var Walker = require("../index") var smallSample = ["div", {}, [ ["p", {}, [ ["span", {}, [ ["#text", { value: "hello" }, []] ]], ["b", {}, [ ["#text", { value: "world" }, []] ]] ]] ]] var smallTerseSample = ["div", [ ["p"...
true
66388fd3d6e34bf508c56d8b6e2ad98c8ef09a38
JavaScript
edXmO/Codewars_Solutions
/Javascript/CountingDuplicates.js
UTF-8
1,140
4.03125
4
[]
no_license
// Count the number of Duplicates // Write a function that will return the count of distinct case-insensitive alphabetic characters and numeric digits that occur more than once in the input string. The input string can be assumed to contain only alphabets (both uppercase and lowercase) and numeric digits. // Example /...
true
0c65d6b8b66c1893c58b6ecc2bf6a10e8a9b8ec0
JavaScript
SergeyJR20/-EventEmitter
/Javascript Async/task_1.js
UTF-8
947
3.34375
3
[]
no_license
const EventEmitter = require('events'); const emitter = new EventEmitter() emitter.on('hello', () => { console.log('Привет') }) emitter.on('answer', answer => { console.log(`Ваши дела ${ answer }`) }) const readline = require('readline'); const rl = readline.createInterface({ input: process.std...
true
6f67af94e700671e706eb97904981c74bc3edd54
JavaScript
ViktorJJF/webScraping
/app.js
UTF-8
1,943
2.734375
3
[]
no_license
const request = require('request'); const cheerio = require('cheerio'); const axios = require('axios'); // let data = "sistema+ecommerce"; // let Url = "http://renati.sunedu.gob.pe/simple-search?query=" + data; // let titles = []; // console.log("Se hizo web scraping a: ", Url); // request( // Url, // (err, re...
true
7767d49d123a06f6c009e643bdfb4e12fd140778
JavaScript
jdeitawimostafa/data-structures-and-algorithms
/javascript/code-challenges/linkedList/linked-list.test.js
UTF-8
4,983
3.625
4
[ "MIT" ]
permissive
'use strict'; const Node = require('./node.js'); const LinkedList = require('./linked-list.js'); const {expect} = require('@jest/globals'); describe('linked-list class',() => { it('should instantiate an empty linked list',() => { let linkedList = new LinkedList; let initalValue = 77; linkedList.insert(...
true
846bed5456817375c1e8d2c4910961cc98eb28d7
JavaScript
vercel-support/soeezauto-client
/src/tools/hooks/useDebounce.js
UTF-8
545
2.578125
3
[]
no_license
import { useEffect, useRef } from 'react'; // source https://gist.github.com/mudge/eb9178a4b6d595ffde8f9cb31744afcf export default function useDebounce(callback, delay) { const latestCallback = useRef(); const latestTimeout = useRef(); useEffect(() => { latestCallback.current = callback; }, [c...
true
e74d20fb817d4f8872bf7dd6418745d25ef3263d
JavaScript
rzfury/pingoo-escape
/js/methods.js
UTF-8
4,282
2.703125
3
[]
no_license
function initCanvas() { canvas = document.getElementById('canvas'); context = canvas.getContext('2d'); }; function fillColor(str) { context.fillStyle = str; } function strokeColor(str) { context.strokeStyle = str; } function clearCanvas() { context.globalAlpha = 1; context.clearRect(0, 0, 800...
true
eda9c27a691b87ad91f75cad2ca0b4f6c9ee5977
JavaScript
AlexJuarez/prism
/packages/runner/src/File.js
UTF-8
831
2.671875
3
[]
no_license
const fs = require('fs'); const recast = require('recast'); const parser = require('./parser'); class File { constructor(options = {}) { this.source = options.source; this.path = options.filePath; this.parser = options.parser || parser; this.read(); this.ast = recast.parse(this.source, { parser...
true
0bea2336ff349ba2b5ba8a4299e9c29246ad532b
JavaScript
NamGungGeon/js-coding-test
/7-3.js
UTF-8
342
3.34375
3
[]
no_license
const input = [1, 2, 3, -3, -2, 5, 6, -6]; const solution = () => { const pos = []; const neg = []; input.forEach((num) => { if (num > 0) { pos.push(num); } else { neg.push(num); } }); return [...neg, ...pos]; }; console.time(); console.log(solution()...
true
8225fd90b9e1632c89e3418a104249323508aed7
JavaScript
bowouhuy/EventRegistration
/assets/js/script.js
UTF-8
2,124
2.734375
3
[]
no_license
$(document).on("click",".submit", function(){ var n =0; var e=0; var h=0; //validasi nama var nama = $(".nama").val().length; if (nama == 0) { document.getElementById('nama-alert').innerHTML = "Nama tidak boleh kosong"; //return false; }else{ d...
true
58642b0ddfeb2baa87ac535732d94d06671617d2
JavaScript
cholosurfer/node-todo-list
/tarea/tarea.js
UTF-8
1,981
3.140625
3
[]
no_license
const fs = require('fs'); let listadoTareas = []; const guardarTarea = () => { let data = JSON.stringify( listadoTareas ); fs.writeFile('db/data.json', data, (err) => { if (err) throw new Error('La tarea no se pudo guardar', err); }); }; const cargarTareas = () => { try { ...
true
021cc4892ca3ee128f3241094e646ecb628ac666
JavaScript
MoeUllah/ProjectSchool
/ShorthandAll/background.js
UTF-8
466
2.96875
3
[]
no_license
var box = document.querySelector('.box'); var radioSelection = document.querySelector('.radio-selection'); var oldClass = ''; function switchFaces() { var selectedRadio = radioSelection.querySelector(':checked'); var newClass = 'show-' + selectedRadio.value; if (oldClass) { box.classList.remove(old...
true
1b07985d505b99ef174352f6d974774d704f7b97
JavaScript
Kelgors/KanVas
/src/List.js
ISO-8859-10
11,688
3.375
3
[ "MIT" ]
permissive
/** * This class is an Array with more function, so is it an ArrayList ? Maybe, but List is shorter * @param {Object|Array} settings * @param {Array} settings.items * @constructor * @type {kan.List} * @extends {kan.Object} */ kan.List = function(settings) { this.types = {}; this.items = new Array(); if (settin...
true
405e021025c974605cf0f08bef6f93dc85fffb99
JavaScript
vundelayamini/EmployeeWageJsPractice
/SequenceStatement.js
UTF-8
1,350
4.28125
4
[]
no_license
//1.Random Function to get Single Digit. let random1 = Math.floor(Math.random() * 10); console.log("Random Single digit number is:" + random1); //2.Use Random to get Dice Number between 1 to 6 let random2= Math.floor(Math.random() * 10) % 6 + 1; console.log("Dice number between 1 to 6: " + random2); //3.Add two Rando...
true
c08b83e7331424e5b48e0076adeca33b65524c66
JavaScript
DevinXian/snippets-code-in-js
/factory-function-es6/demo-compiled.js
UTF-8
2,186
3.21875
3
[]
no_license
'use strict'; let _extends = Object.assign || function (target) { for (let i = 1; i < arguments.length; i++) { let source = arguments[i]; for (let key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; let withConstruct...
true
6e9e9169e6ffad1ec61ed5929aae0c9c77720ae5
JavaScript
jiangshanmeta/meta
/src/1558.minimum-numbers-of-function-calls-to-make-target-array.1662/solution.js
UTF-8
535
3.484375
3
[ "MIT" ]
permissive
/** * @param {number[]} nums * @return {number} */ var minOperations = function (nums) { let result = 0; // 需要*2的最大次数 let max = 0; for (let num of nums) { // count统计的是右移次数 由于统计了最后一个1的右移(应该只算+1) 所以要-1 let count = 0; while (num) { if (num & 1) { resul...
true
fa52db8114100ffee9e87567146a6135ba356cc6
JavaScript
shpaker/jsChip-8
/script.js
UTF-8
435
2.640625
3
[ "MIT" ]
permissive
/* */ function draw(canvas, pixels) { 'use strict'; var i, len, context = canvas.context; for (i = 0, len = pixels.length; i < len; i++) { if (pixels[i].isRedraw()) { var x = i / 64 | 0, y = i - x * 64; context.fillStyle = pixels[i].isActive() ? canvas.color[0] : ca...
true
6dcb7440312bff75053ea6ec4aac63d065164b2a
JavaScript
chinapoopoo/esc
/js/chat.js
UTF-8
1,787
2.59375
3
[]
no_license
import * as Login from "./login.js"; $(document).ready(() => { scrollToEnd(); $("input").on("keyup", e => { if (e.keyCode == 13) { if (!Login.isLoggedIn()) { alert("Please login first"); Login.login(); return; } $(".messages").append(myMessage($("input").val())); ...
true
629a1745994059770783a6822cb673c1583147db
JavaScript
mfallon/d3-flatfile-cms
/config/scripts/build.js
UTF-8
3,020
3
3
[]
no_license
const fs = require('fs'); /** * This could be a rollup plugin **/ import config from '../app.config'; import Tree from './components/Tree'; import FileQueue from './components/FileQueue'; /** * Read all the files crawling starting from a certain folder path * @param { String } path directory path * @returns { Array...
true
23c169f753dbf9e4aa68910b39b052cc8be39c5e
JavaScript
MarieKelling/IT-2320
/IT 2320 Assignments/Assignment 5 - Introduction to JQuery/CheckerBoard/CheckerBoard/Scripts/Home.js
UTF-8
2,234
2.65625
3
[]
no_license
$(document).ready(function () { var cells = $(".cell"); var colorCount = 0; //var blackPieces = $(".black"); //var redPieces = $(".red"); //var checkerPiece = (".black", ".red"); var occupiedCell = $(".piece"); var Cell = $(".cell"); var redCell; var blackCell; for (var i = 0;...
true
017086127d6d8fe33bc42f9d02afc43b34a9bcbd
JavaScript
milligan22963/pageBuilderV2
/js/inheritance.js
UTF-8
590
2.984375
3
[ "MIT" ]
permissive
/** * Inheritance * * see: http://phrogz.net/js/classes/OOPinJS2.html */ Function.prototype.inheritsFrom = function(parentObj) { // normal object i.e. function if (parentObj.constructor == Function) { this.prototype = new parentObj; this.prototype.parent.push(parentObj.prototype); ...
true
6808cfd60fdc3f17106866c35028b21449c4a85c
JavaScript
thomaskarlrichter/arangoCMS
/assets/js/collections/contentCollectionFactory.js
UTF-8
1,222
2.5625
3
[ "Apache-2.0" ]
permissive
var app = app || {}; (function () { "use strict"; app.ContentCollectionFactory = function () { this.create = function(name, callback) { $.get("structs/" + name, function(data) { var defaults = {}, columns = []; _.each(data.attributes, function (content, name) { swit...
true
e1e7a2e86b47f733e639b35d6af1f1fe721a8224
JavaScript
ttsukagoshi/toggl-scripts
/src/toggl.js
UTF-8
14,739
2.609375
3
[ "MIT" ]
permissive
// MIT License // // Copyright (c) 2020 Taro TSUKAGOSHI // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, m...
true
ce5ecba2f93f01296b01d75a7c98be9fa27a77d6
JavaScript
mikec/bcd3
/blockchain-data-service.js
UTF-8
2,163
2.65625
3
[]
no_license
/* run this node service to generate some data. it's dummy data right now, but could be implemented to pull from biteasy API after running, browse to a block: http://localhost:9494/blocks/1DKWD5VVDH or with address data included: http://localhost:9494/blocks/1DKWD5VVDH...
true
fd288fa16699a7e58f3ba845e800fda2626c40e4
JavaScript
Santyf/Startalk
/assets/app.js
UTF-8
2,168
2.90625
3
[]
no_license
$(document).on("click", ".gif-btn", displayInfo); var topics = ["Sports", "Dogs", "Gaming", "Music"]; function displayInfo() { var name = $(this).attr("data-name"); var APIKey = "IcqtslR9hjOS6kk8EC1CldDCskqZoWYT"; var queryURL = "https://api.giphy.com/v1/gifs/search?q=" + name + "&api_key=" + APIKey + "&l...
true
7a1d5c22bf2da93bce8f912604d85775fc4672b0
JavaScript
AymanRayan/Dicee
/index.js
UTF-8
561
3.5
4
[]
no_license
var randomNumber1=Math.floor(Math.random()*6)+1; document.querySelector(".img1").setAttribute("src","images/dice" +randomNumber1+".png"); var randomNumber2=Math.floor(Math.random()*6)+1; document.querySelector(".img2").setAttribute("src","images/dice" +randomNumber2+".png"); if (randomNumber1 > randomNumber2){ ...
true
62816569dc81be3cf01c48f2afa5e539dcbd2f01
JavaScript
juliotorresmoreno/api-test
/src/routes/auth.js
UTF-8
2,313
2.515625
3
[]
no_license
const express = require('express'); const bcrypt = require('bcrypt'); const jwt = require('jsonwebtoken'); const router = express.Router(); const User = require('../models/User'); const createError = require('http-errors'); const secret = require('../config').secret; /** * @typedef {import('./@types').LoginData} Logi...
true
579fb4813cae6a7dc4dbd1648e44e723dd9c5481
JavaScript
iwollmann/ReactStudyES6
/src/components/timesheet/ListHours.js
UTF-8
1,050
2.59375
3
[]
no_license
import React, {Component, PropTypes} from 'react'; class ListHours extends Component { constructor(props) { super(props); this.removeHour = this.removeHour.bind(this); } removeHour(hour) { this.props.removeHour(hour); } render() { function renderHours(hour) { ...
true
e94adb7ecd51b59600818a37b310da5a4df456ee
JavaScript
rjrahul/simple-tote-bet
/app/dividend-calculator/index.js
UTF-8
1,820
2.84375
3
[ "MIT" ]
permissive
'use strict'; var _ = require('lodash'); var ExactaBetCalc = require('./exacta-bet-calc'); var PlaceBetCalc = require('./place-bet-calc'); var WinBetCalc = require('./win-bet-calc'); var Promise = require('bluebird'); /** * This method calculates dividends for each type of bets and returns an object denoting * the ...
true
90372f9028f7fa4426c78d754b31386da5d2d472
JavaScript
DPF2EBS/heatPage
/public/js/main.js
UTF-8
1,185
2.609375
3
[]
no_license
// watch the heatmap of url function watchUrl(url){ document.getElementById('watchPage').src = url } function setPageSize(width, height){ heatmapEl = document.getElementById('heatmapEl') watchPage = document.getElementById('watchPage') //watchPage.offsetWidth = width + 'px' watchPage.style.height = height +...
true
3e100db568197236c699749fe859ee61ff82a86b
JavaScript
myjiyane/indaba-stands
/model/contact.js
UTF-8
495
2.625
3
[]
no_license
/* Compile model from schema The first argument is the singular name of the COLLECTION that will be CREATED for your model and the second argument is the SCHEM you want to use in creating the model. The model represents a collection of documents in the database that you can search */ var mongoose = require('mongoo...
true
ba760e948945a5b1f90865b2bfbbe073f1968411
JavaScript
martinj/node-imagickal
/lib/imagickal.js
UTF-8
7,197
2.609375
3
[]
no_license
'use strict'; const Promise = require('bluebird'); const exec = require('child_process').exec; const printf = require('util').format; const stream = require('stream'); const Readable = stream.Readable; const ImageMagickCommands = require('./commands'); const debug = require('debug')('imagickal'); let globalOpts = {}; ...
true
df1005d646438a001b2500a60bef86ce8cda18dc
JavaScript
mmanumos/holbertonschool-higher_level_programming
/0x12-javascript-warm_up/4-concat.js
UTF-8
162
3.078125
3
[]
no_license
#!/usr/bin/node const list = []; process.argv.forEach((val, index) => { if (index >= 2) { list.push(val); } }); console.log(list[0] + ' is ' + list[1]);
true
44acfef81d396c817ba09a088e90b55696347e8c
JavaScript
mohammedsingapur/basic_react_calculator
/src/components/Calci.js
UTF-8
8,234
2.6875
3
[]
no_license
import React, {Component} from 'react'; import './style.css' class Calci extends Component{ constructor(){ super(); this.state = { temp : '', firstOprand : '0', secondOprand : '', Operator : '' } } seven(){ ...
true
bc949ea27079bb32f7623bea85109afeff272045
JavaScript
MaligneCanyon/js210
/exercises/language_fundamentals/basics_ex8.js
UTF-8
850
3.921875
4
[]
no_license
function stringToInteger(str) { let num = 0; const CHAR_TO_DIGIT = { '0': 0, '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, } for (let i = 0, j = str.length - 1; i < str.length; i++, j--) { num += CHAR_TO_DIGIT[str[i]] * Math.pow(10, j); } ...
true
24ebd05f893f4bc01767d99f416be5552d9b6099
JavaScript
iGenius-Srl/js-exercises
/src/es6/index.js
UTF-8
2,650
4.875
5
[]
no_license
/* * Exercise #1 * Define a const variable and then change it. Show the world that you can do the unthinkable. */ // YOUR ANSWER HERE /* * Exercise #2 * Initialized an array in as many ways you can think of * Hint: try to understand the difference between them, and which one is your "favourite" */ // YOUR COD...
true
ad183675ed7dd4eb29a46ba16f08db833bde7cc7
JavaScript
DanilovMaxim13/library
/index.js
UTF-8
9,564
2.578125
3
[]
no_license
let favorites = []; let ratingStorage = {}; let publisherFilter = {}; let authorFilter = {}; let yearFilter = {}; let allArticul = []; let JSONdata; document.addEventListener("DOMContentLoaded", function() { checkFavorites(); checkRating(); createCatalog(); liveSearch(); modificationOnclick(); }); functi...
true
d642788e0a6449e19cbb83ac0b86cf40e08b8180
JavaScript
appcelerator-forks/ti-plugin-install
/lib/install.js
UTF-8
2,000
2.65625
3
[ "MIT" ]
permissive
const path = require('path'); const fs = require('fs-extra'); const tiappXml = require('tiapp.xml'); const resolve = require('resolve'); /** * Installs plugin * @param {String} projectDir * @param {String} pluginName * @param {Boolean} updateTiApp * @param {EventEmitter} emitter */ const install = (projectDir, p...
true
b1989331b46d6d95810cbd031e35e86215fbc634
JavaScript
ErosMLima/Training-Jan-2021
/Modules/NodeJS/Day10/Parth Parekh/Assignment/Domain/studentlogic.js
UTF-8
2,154
2.84375
3
[]
no_license
const StdModel = require("../Models/Student"); class StudentData { //Get All student Details async getAllStudentData(req, res) { const result = await StdModel.find(); res.send(result); } //Particular Student Record From Id async getStudentDataFromId(req, res) { const result...
true
ca5687eb6d4ebbcd9e8e3d9f601871d207af5745
JavaScript
hsinying1229/GeneralEducation
/MindQuiz/data.js
UTF-8
1,701
2.640625
3
[]
no_license
var questions = [ { "question":"你現在對自己的通識課程非常樂觀?", "answers":[ ["是的",2], ["不是",3], ["不知道",6] ] }, { "question":"大學的學習通識課程當中,你有沒有受到很大的影響?", "answers":[ ["有的",3], ["沒有",7], ["還在承受著呢",5] ] ...
true
7f974ab988048a49bb1a5ad813d353fe58844d95
JavaScript
mmiszy/server-side-rendering-node-demo
/static/browser.js
UTF-8
600
2.640625
3
[]
no_license
const defaultState = {originalUrl: ''}; document.body.addEventListener('click', e => { if (e.target.tagName.toLowerCase() === 'a') { e.preventDefault(); const { href, pathname: originalUrl } = e.target; const state = { originalUrl }; history.pushState(state, null, href); updateView(state); } ...
true
d1decb2a7a875143ee7b2fe2f888dffc7eb15dad
JavaScript
ldgpangeo/recon
/ajax.js
UTF-8
1,473
3
3
[]
no_license
// Get the HTTP Object function getHTTPObject(){ if (window.ActiveXObject) return new ActiveXObject("Microsoft.XMLHTTP"); else if (window.XMLHttpRequest) return new XMLHttpRequest(); else { alert("Your browser does not support AJAX."); return null; } } // Change the value of the outputText field function ...
true
1dd50503b4c2c99aa0df105100d3c06fb44f1ea1
JavaScript
vadimmelnikov/dz-js
/hm6/02/main.js
UTF-8
843
3.171875
3
[]
no_license
var cont = document.getElementById('cont'); var src = 'https://raw.githubusercontent.com/smelukov/citiesTest/master/cities.json'; function sendRequest(url) { return new Promise(function (resolve, reject) { var xhr = new XMLHttpRequest(); xhr.open('GET', url); xhr.responseType = 'json'; xhr.send(); xhr.addE...
true
76a970b87a8bceb0e910316e278ee6108de3ce88
JavaScript
Thorleye/Giphy-Project
/assets/script.js
UTF-8
3,260
3.28125
3
[]
no_license
//vars// var APIKey = "&api_key=bHqkMcxYFjGLDZN4kdne5mYiOLUHWDnH" var limit ="&limit=10" var rating = "&rating=g" //Initial array// var gifArray = ["NBA-block", "NBA-windmill", "NBA-tomahawk" ,"NBA-half-court", "NFL-celebration", "NFL-sack", "NFL-touchdown", "NHL-breakaway", "Fifa-bicycle-kick", "NHL-save", "NHL-hit...
true
3016707a56e9991dba3ab8a4931d65e844a7b15e
JavaScript
phillymedia/apps-modules-helpers
/test/logging/debug.spec.js
UTF-8
1,487
2.703125
3
[ "MIT" ]
permissive
/* eslint-env mocha */ /* eslint-disable no-unused-expressions */ /* eslint-disable prefer-arrow-callback */ // DEPENDENCIES // ============================================================================= // TESTED METHODS ------------------------------- import log from "COMP/logging"; import { expect } from "chai"; ...
true
910e3653e7d30005f9e9641e9af901f415b40eff
JavaScript
lupyuen/thethingsio-wifi-geolocation
/update_thing.js
UTF-8
2,920
3.140625
3
[ "Apache-2.0" ]
permissive
// This Cloud Code Function is called by Cloud Code Functions "geolocate" and "transform" // to update the sensor data in a thing, after computing the geolocation or transforming // the values. function updateThing(params, callback) { // params contains thingToken and values, containing the sensor values. // ...
true
3684d7406eaa8e8844e6886de41fc53126b18345
JavaScript
gaaiatinc/async-job-queue
/lib/index.js
UTF-8
3,750
2.703125
3
[ "Apache-2.0" ]
permissive
/** * Created by Ali on 7/29/2015. */ "use strict"; var EventEmiiter = require("events").EventEmitter, Q = require("q"); var configDefaults = { instanceId: "defaultJobQueueInstance", persistent: false, maxSize: 1000, heartbeatMillis: 60000, consoleLog: true }; /** * * @param config * @...
true
31834be5bc8e32dc7edb814351e30347c5465752
JavaScript
bugron/npm-offline-registry
/lib/createDirectoryTree.js
UTF-8
2,181
2.75
3
[ "MIT" ]
permissive
const path = require('path'); const readDirContents = require('./utils/readDirContents'); const dirFilter = require('./utils/dirFilter'); // First part of the indexing algorithm: get paths of all packages in the registry /** * Recursively creates a list of all package paths relative to the local npm registry * * @p...
true
05e8b8a3f544f7bd7ae675daf54de2a409762b7e
JavaScript
chinh-nguyen-ecep/advertiser-reporting-ui
/verve-lib/scripts/utils/pentaho_ajax.js
UTF-8
4,520
2.515625
3
[]
no_license
function pentahoActionURL( solution, path, action, params) { // execute an Action Sequence on the server var url = "/pentaho/ViewAction"; // create the URL we need var query = "wrapper=false&solution="+solution+"&path="+path+"&action="+action; // add any parameters provided if( params ) { var idx; ...
true
2e4867f975bdc6152de9fa54a7a93d87849b86c2
JavaScript
justinavickers/LightningExercises
/Lightning 1-11-19/exercise5.js
UTF-8
1,152
5.15625
5
[]
no_license
// 1. Design a function named `evenOrOdd` that take a single number // as an argument. // 2. It should return the string "Even" if the number is evenly // divisible by two. // 3. It should return the string "Odd" if the number is not evenly // divisible by two. // Use the modulo - or remainder - operator in Ja...
true
c5d58b03a7a9c0735f89c76a25a84bb4bb7fcd08
JavaScript
meedan/check-web
/src/app/components/task/DatetimeTaskResponse.js
UTF-8
2,889
2.609375
3
[ "MIT" ]
permissive
/* eslint-disable @calm/react-intl/missing-attribute */ import React from 'react'; import { FormattedMessage, FormattedDate } from 'react-intl'; import { convertNumbers2English } from '../../helpers'; const DateDisplay = ({ isoDate }) => ( <time dateTime={isoDate}> <FormattedDate value={new Date(isoDate)} day="n...
true
57a0eee7a91cb87893352e7eafc068916613f1a2
JavaScript
NarasimhaReddy13/react_hooks
/src/Hooks-Practice/3_ReactCallBacks/2_useMemo.js
UTF-8
997
3.453125
3
[]
no_license
import React, {useState, useMemo} from 'react' export default function UseMemoHook() { const [count, setCountOne] = useState(0) const [countTwo, setCountTwo] = useState(0) const incrementTwo = () => { setCountTwo(countTwo + 2) } const isEven = useMemo(() => { return count % 2 ===...
true
57a84aad446a4736d30d1cfd3e5f3b8485b216db
JavaScript
AndersDJohnson/promise-recurse
/src/promise-recurse.js
UTF-8
595
2.515625
3
[ "ISC" ]
permissive
export function promiseRecurse (startPromise, makeNextPromise) { return new Promise(function (resolve, reject) { var results = [] var handle = function (nextPromise) { return nextPromise.then(function (result) { results.push(result) nextPromise = makeNextPromise(result, results) ...
true
5930b0f25b1649c5f74dc05676a314dc5e4eab6b
JavaScript
xyz-ninja/html5_multiplayer_game
/js/units.js
UTF-8
13,455
2.8125
3
[]
no_license
class ingamePlanet{ constructor( game , serverPlanet ) { this.game = game; this.id = serverPlanet.id; this.x = serverPlanet.x; this.y = serverPlanet.y; this.spriteImage = serverPlanet.sprite; this.player = serverPlanet.player; //////////// // FIELDS // //////////// this.shipsCount = server...
true
e11413c382eeb8bdab073bdac571d92380a807b3
JavaScript
hatchways/team-cupcake
/server/models/user.js
UTF-8
1,451
2.703125
3
[ "MIT" ]
permissive
const mongoose = require("mongoose"); const Schema = mongoose.Schema; const uniqueValidator = require("mongoose-unique-validator"); const bcrypt = require("bcrypt"); // still should be made async const UserSchema = new Schema({ username: { type: String, required: [true, "Please enter a username !"], matc...
true
78c12e55317283b0d1c77ab6fc02e88e85ae4972
JavaScript
NickSourvanos/AutoServiceDemo
/src/main/resources/static/jsAjax/vehiclesajaxcalls.js
UTF-8
2,111
2.75
3
[]
no_license
function populateVehiclesTable(){ $.ajax({ type: 'GET', url: 'http://localhost:8080/admin/api/vehicles', success: function(result){ var vehicles_data = ''; result.forEach(function(d){ vehicles_data += "<tr>"; vehicles_data += '<td>' + d...
true
c6dab9115e7ee8a7d78e952e0954b6f15f11749c
JavaScript
MirkoGriffo/js-snacks-recap
/js/script.js
UTF-8
6,128
3.71875
4
[]
no_license
/* Snack 1 A: Creare un oggetto che rappresenti un giocatore di basket, con le seguenti proprietà: - Età - Media punti fatti per partita - Percentuale di successo per tiri da 3 punti - Codice giocatore Generare tramite delle funzioni le statistiche di gioco, secondo queste regole: - l'età deve essere compresa tra 18 e ...
true
a67b6c6fd0bdb7746a3ccefea95422928ae6ae4f
JavaScript
FacundoComaschi/CursoIngresoJS
/9-Parciales/2020_1Cuatri_parcial_fuentes/dos.js
UTF-8
2,554
3.328125
3
[]
no_license
function mostrar() { var respuesta = true; var tipoBolsa; var cantidadBolsas; var precioPorBolsa; var precioConDescuento; var cantidadTotalBolsas=0; var importeBruto=0; var banderaMasCantidad = "primera vez"; var banderaCantidadBolsas; var banderaTipoMasCantidad; var banderaMasCaro = "primera vez"...
true
6378529ba85af9c841366647cab093c3180e40d4
JavaScript
tamaramack/tamaramack.github.io
/src/js/colors/color.js
UTF-8
1,914
2.5625
3
[]
no_license
/** * color js file created by Tamara G. Mack on 24-Apr-19 for tamaramack.github.io */ import ColorInterface from './interface'; import ColorBase from './base'; import FlexColor from './flex-color'; import Mani from './manipulations'; const { saturation, lightness, contrast, blend, compare } = Mani; expor...
true
71bf05fbcc0b5bdf044217a86bbf6d7fbf2e0930
JavaScript
ardnet/barcamp-redux
/app/components/CounterSlide.jsx
UTF-8
2,459
2.953125
3
[ "Apache-2.0" ]
permissive
/** * barcamp-redux | CounterSlide.jsx * * @author Kelvin De Moya <http://github.com/kdemoya>. */ import React, { Component } from 'react'; let styles = {}; class CounterSlide extends Component { /** * Español: * Maneja el click en los botones de nuestro contador, * y decide si el contador debe aumen...
true
16830bf9c70fd1c93866d1df3ba09142fc20caf7
JavaScript
impaler/browser-catch
/src/drivers/phantom-driver.js
UTF-8
1,103
2.625
3
[]
no_license
const phantomjs = require('phantomjs-prebuilt') const net = require('net') const webdriverOptions = { desiredCapabilities: { browserName: 'phantomjs' } } export default async function (options) { let port = await getPort() options = Object.assign({}, {port}, options) let driver = await createDriver(op...
true
0c0339a6aee546b610fcbea308e55e72d5a8ac30
JavaScript
krishcdbry/javascript-algo-snips
/test/cdci/arrays-strings/isunique.test.js
UTF-8
777
3.1875
3
[]
no_license
const isUnique = require('../../../cdci/arrays_strings/is_unique'); const K1 = "abcdefghijklmnop" const K1_RES = true; const K2 = "abcdefghgjkliopab" const K2_RES = false; const K3 = "aa" const K3_RES = false; const K4 = "" const K4_RES = false; describe('Checking the string with unique characters', () => { it...
true
b76c244b948d189b66c32c8fdd9e8a1f583fe392
JavaScript
UmbreonHugs/myreads-book-tracking-app
/src/Search.js
UTF-8
2,379
2.84375
3
[]
no_license
/* Search.js * This component will render the search page, as well as the functionality to * search for books within the API */ import React, { Component } from 'react' import PropTypes from 'prop-types' import { Link } from 'react-router-dom' import Book from './ListBooks' import * as BooksAPI from './BooksAPI' ...
true
8eeb5edaa7b2e9e2d5486e35b11dc0ce9cfda90c
JavaScript
mishamyrt/GPort
/src/gport.js
UTF-8
3,078
2.671875
3
[]
no_license
const mqtt = require('mqtt') const fs = require('fs') const { createLogger } = require('./logger') const { prepareEnvironment, getConfiguration } = require('./configuration') let config; class gPort { static start (argv) { this.services = {} this.log = createLogger( 'gPort', argv.length > 2...
true
340fb5cf9564fc299bb5cad9ef310ffba3260f23
JavaScript
opetstudio/XProperty
/xproperty/Lib/helper/imageUrlGenerator.js
UTF-8
1,873
2.8125
3
[]
no_license
import { includes, isEmpty, isUndefined, isNull } from 'lodash' import { dpiDetector } from './dpiDetector' /** * This helper uses to generate/extract different types of URL for images * images is an object that accepts following keys: * banner * landscape * portarit * search */ const checkIfImageExists ...
true
f63a3cfc3b044a7483addd0bde4b062046c5f78d
JavaScript
allysonwilson/hero_rat
/specs/task_spec.js
UTF-8
768
2.875
3
[]
no_license
var assert = require("assert"); var Hero = require("../hero.js"); var Task = require("../task.js"); beforeEach(function () { flyAirplane = new Task(5, 10, 100); eatCheeseBurger = new Task(-5 , 100, 5); }); // why does Task need to be in quotes? describe( "Task", function(){ it("should have a difficulty level"...
true
ad432759d9685ef5c2f5b81d85cc33c4f4c1946d
JavaScript
laffed/HelpfulHuman-Challenge
/application/routes/index.js
UTF-8
1,084
2.65625
3
[]
no_license
const express = require('express'); const router = express.Router(); const getHues = require('../helpers/getHues'); const ranHexStringArr = require('../Data/ranColorData'); router.get('/api/colors/:page', (req, res, next) => { let page = req.params.page; const perPage = 12; const pageCount = Math.ceil(360 / per...
true
315b2e0519b9712688878cc73d7a5c34c2c01b60
JavaScript
guilhermeee87/IntroducaoJS
/js/main.js
UTF-8
2,521
3.734375
4
[]
no_license
function clicou(){ document.getElementById("agradecimento").innerHTML = "<b>Obrigado por clicar</b>" //console.log(document.getElementById("agradecimento")) //alert("Obrigado por clicar") } function redirecionar(){ window.open("https://www.globo.com/"); //abre em outra aba //window.location.href="h...
true
57831a94c5b58173444f59190813d0644a6ca07a
JavaScript
mattwolff/summer2019-yale
/js/mousemove.js
UTF-8
1,207
3.8125
4
[]
no_license
let wrap = document.querySelector(".wrap"); let num = document.querySelector(".num"); let i = 0; // I made up a function called 'trace'; function trace(pos) { // I want to create a new element on the page! // I'm referencing this new element by naming it simply "el". // document.createElement() means make a new...
true
3fd30520704f1525abf3f143cd96d7d414fe42cd
JavaScript
MovieRecEngSoft/MovieRec
/web/src/Pages/Search/index.js
UTF-8
3,448
2.65625
3
[]
no_license
import React, { useEffect, useState } from "react"; import { Link, useParams, useHistory } from "react-router-dom"; import axios from "axios"; import Card from "../../Components/Card"; import Menu from "../../Components/Menu"; import Searchbar from "../../Components/Searchbar"; import getImageAddress from "../../asset...
true
503e31e9899b3630f96bd63dfad9b8d821730187
JavaScript
GoldL/leetcode
/code/string/lesson1.js
UTF-8
914
3.484375
3
[]
no_license
/* 给定一个字符串,你需要反转字符串中每个单词的字符顺序,同时仍保留空格和单词的初始顺序。 示例1: 输入: "Let's take LeetCode contest" 输出: "s'teL ekat edoCteeL tsetnoc" 注意:在字符串中,每个单词由单个空格分隔,并且字符串中不会有任何额外的空格。 来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problems/reverse-words-in-a-string-iii 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。 */ export default (str) =>...
true
971fd19e1b0af7f83398c41c9a5ad1b53c6cd2f7
JavaScript
rootTheLure/tessel-talk
/slides/examples/tessel/tessel-test-projects-master/4-servo-test/calibrate.js
UTF-8
1,507
2.84375
3
[ "MIT" ]
permissive
var tessel = require('tessel'); var servolib = require('servo-pca9685'); var servo = servolib.use(tessel.port['D']); var servoNumber = 1; // Plug your servo or motor controller into port 1 // Reenable the console process.stdin.resume(); console.log('Type in numbers between 0.0 and 1.0 to command the servo.'...
true
aa779b67d0d7a05b1049bc6ade7ba911e96a6748
JavaScript
junhui/hubot-scripts
/dist/drush.js
UTF-8
7,299
2.53125
3
[ "MIT" ]
permissive
// Description: // Playing with Drush integration. Simple implementation of informational drush commands, and a base // interface for further drush command integration. // Dependencies: // None // Configuration: // The hubot user will need permissions to run drush on the server that it is installed on. // I...
true
cb7a6ccac750c44be1f0209e411b57450e5e6692
JavaScript
hieutdo/data-structures-and-algorithms
/leetcode/151-reverse-words-in-a-string.spec.js
UTF-8
705
3.640625
4
[]
no_license
const reverseWords = require('./151-reverse-words-in-a-string'); describe('Reverse words in a string', () => { it('returns correct result when input has multiple spaces between words', () => { const input = 'the sky is blue'; const output = 'blue is sky the'; expect(reverseWords(input)).toBe(outpu...
true
d6a4bbb0d5c6794137cc94af7e137529d813917e
JavaScript
Archiit19/The-JavaScript-Workshop
/Lesson05/general-code-snippets/the_number_object.js
UTF-8
1,601
4.34375
4
[ "MIT" ]
permissive
5.123.toPrecision(3); // returns “5.12” var num1 = 99; var num2 = Number(99); var num3 = new Number(99); console.log(num1 == num2); // outputs ‘true’ console.log(num1 == num3); // outputs ‘true’ console.log(num2 == num3); // outputs ‘true’ console.log(num1, num2, num3); // outputs ‘99 99 Number {99}’ console.log( f...
true
1809b7c561f00ef671011de4667b49326d25d1b1
JavaScript
saket-p/JSSnippets
/polyfills/Array/union.js
UTF-8
546
3.03125
3
[]
no_license
export default function union(...arrays) { return arrays.reduce((acc, array) => { array.forEach(element => { if(!acc.map[element]) { //Since using object.keys on acc.map can break ordering, so to maintain the order, //we push in array and compare using map ...
true
203515faab9acb910f60aaabb85df1b59395d2ca
JavaScript
imattdu/osns-page
/src/utils/storageUtils.js
UTF-8
3,218
3.265625
3
[]
no_license
/* 向local中存储数据的工具模块 1. 向外暴露一个函数(功能) 只有一个功能需要暴露 2. 向外暴露一个对象(包含多个功能) 有多个功能需要暴露 */ const TODOS_KEY = 'login_status_key' const USER_KEY = 'user_info' export default { readLoginStatus () { return JSON.parse(localStorage.getItem(TODOS_KEY) || false) }, saveLoginStatus (login) { localStorage.setItem(TODOS...
true
2282c36d842433a321d2f8be532cf60b6724c976
JavaScript
joevaske/jquery-webshop
/js/components/increase-decrease-cart.js
UTF-8
1,752
3.265625
3
[ "MIT" ]
permissive
$(document).ready(function() { $(document).on("click", ".qtyplus", function(e) { // Stop acting like a button e.preventDefault(); // Get the field name fieldName = $(this).attr("field"); // Get its current value var currentVal = parseInt($("input[name=" + fieldName + "]").val()); // If is...
true
37caf88865a7cd84ceb4caf0b7980bc6c47afbb6
JavaScript
Cdunagan05/NewDevRepo
/Lucky_Sevens/scripts/luckySevens.js
UTF-8
1,693
3.921875
4
[]
no_license
//The way the instructions are worded, it sounded like it wanted a question to be asked to the user before //they entered the number into the field. So that's why this is here. function askUser() { alert ("How much money do you have to bet? Please enter it in the appropriate field to play!") }; function playLu...
true
a52ef2cc1192d27bc2a15b0e29b65ce41bc29847
JavaScript
RomanADavis/learn-programming
/html5/YDKJS/up-and-running/chapter1/practice/phone_purchase.js
UTF-8
1,689
3.21875
3
[]
no_license
function phonePurchase() { function bankInit(){ return Number(prompt( "How much money is in your bank account?" )); } function purchaseLoop(account) { var account = bankInit(); const PHONE_PRICE = 90; const ACCESSORY_PRICE = 10; const TAX_RATE = 0.07; ...
true
4aed76ca60c5738e29953bd4d32514514eda9aa6
JavaScript
kgoooo/Grillber_Frontend
/src/components/CharcoalGrills.js
UTF-8
1,322
2.515625
3
[]
no_license
import React from 'react'; const CharcoalGrills = ({grills}) => { return <div> <h2>Charcoal grills:</h2> <div className="grills__wrapper"> {grills.length >= 1 ? grills.map(grill => ( <div key={grill.name}> <div className="card"> <div className="card__side card__side--front"> <...
true
01ac93bb2838453a96f5d2e24f8db43601e6bcad
JavaScript
Musashi-Sakamoto/mongo-express
/src/public/js/like.js
UTF-8
920
2.8125
3
[]
no_license
$(document).ready(function(){ $("button.like").on('click', (e) => { console.log('id: ', e.currentTarget.id) const { id } = e.currentTarget $.ajax({ type: 'put', url: `/blogs/${id}/like`, }).done(() => { console.log('done') console.log(e.currentTarget.firstChild) e.current...
true
d4f7eddec8200bb410886afe38dbc2a52be27c8b
JavaScript
Danilo-Xaxa/curso_web_moderno
/Funções/exerciciosResolvi/ex12.js
UTF-8
161
3.859375
4
[ "MIT" ]
permissive
function fatorial(numero) { if (numero === 0) { return 1 } else { return numero * fatorial(numero - 1) } } console.log(fatorial(10))
true
f712fa5b0328417ea19368886294a7f68bfc7154
JavaScript
zeckdude/learning
/javascript/react/wes-bos--react-for-beginners/root/catch-of-the-day/src/components/App.js
UTF-8
5,772
2.78125
3
[]
no_license
import React from 'react'; import Header from './Header'; import Order from './Order'; import Inventory from './Inventory'; import Fish from './Fish'; import sampleFishes from '../sample-fishes'; import base from '../base.js'; class App extends React.Component { constructor() { super(); console.log('constru...
true
86c2f36299d739c725e87d7225dbb10268f412c7
JavaScript
Ephem/react-lightyear
/packages/react-test-renderer/src/__tests__/ReactShallowRendererHooks-test.js
UTF-8
11,804
2.65625
3
[ "LicenseRef-scancode-warranty-disclaimer", "MIT" ]
permissive
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @emails react-core * @jest-environment node */ 'use strict'; let createRenderer; let React; describe('ReactShallowRenderer w...
true
7fdd65ddcafd1ab759ad2d072039357cc3bcf092
JavaScript
ptoora/mysite
/test/specs/homePageTests.js
UTF-8
909
2.515625
3
[]
no_license
var assert = require('assert'); const HomePage = require('../pages/homePage.js'); var chai = require('chai'); var chaiWebdriver = require('chai-webdriverio').default; chai.use(chaiWebdriver(browser)); describe('Home page should exist with expected links and footer', function() { var homePage = new HomePage(browse...
true
0ee0ed5355c81f946bd2585e99a0515e02a46fad
JavaScript
rutvij92/pro-c31
/sketch.js
UTF-8
1,259
2.9375
3
[]
no_license
const Engine = Matter.Engine; const World = Matter.World; const Bodies = Matter.Bodies; const Body = Matter.Body; const Constraint = Matter.Constraint; var ground; var divisions=[]; var particles=[]; var plinkos=[]; var divisionheight=300; function setup() { createCanvas(480, 800); engine = Engine.create(); wo...
true
a26b2c5b4e535fe67fd1fc6c725b3eaee35abb0e
JavaScript
ulisses-alves/elm-element
/src/index.js
UTF-8
4,291
2.65625
3
[]
no_license
const defaultConfig = { attributes: {}, properties: {}, events: {} } export function define (init, config = {}) { const cfg = Object.assign({}, defaultConfig, config) const attributeHandler = createIncomingMessageHandler(cfg.attributes) const propertyHandler = createIncomingMessageHandler(cfg.pr...
true
61107345fa4555eb1bb088f0bbb833501275f57f
JavaScript
unlock-protocol/unlock
/packages/unlock-js/src/PublicLock/v4/updateLockSymbol.js
UTF-8
826
2.703125
3
[ "MIT" ]
permissive
/** * Update the three-letters symbol of a lock (default to KEY) * @param {object} params * - {PropTypes.address} lockAddress : address of the lock for which we update the symbol * - {string} symbol: the new symbol of the lock * @param {function} callback invoked with the transaction hash */ export default async ...
true
a9685b5ce523f38a7a28870965dbc4d5b9eb6868
JavaScript
rafael-g-depaulo/DEPRECATED-discord-bot
/lib/cards.js
UTF-8
11,506
3.75
4
[]
no_license
const path = require('path'); /** * @description draws a card * * @returns {string} string of the card drawn */ exports.draw = function() { let cardId = Math.floor(Math.random() * 54) + 1; // get the card number // if 53 or 54, it's a joker if (cardId > 52) { let color = "BLACK"; if ...
true
3464adbb6a239ca995ac325b517c57f384d65665
JavaScript
tirthvshah/NewsWebApp
/public/ui.js
UTF-8
1,127
3.203125
3
[]
no_license
class UI { constructor() { this.city; this.defaultCity = "Mumbai"; this.temp = document.querySelector('[data-temperature]') this.wind = document.querySelector('[data-wind]') this.weather = document.querySelector('[data-weather]') this.location = document.querySelector('[data-loca...
true
aa0fcff1deec3705154f0eee1f4894bf133447d4
JavaScript
noellehamberis/fullstack-chat
/frontend/static/src/components/Chat/Form/index.js
UTF-8
1,062
2.5625
3
[]
no_license
import React from 'react'; import Cookies from 'js-cookie'; class ChatForm extends React.Component { constructor(props) { super(props); this.state={ user: '', content: '', } this.handleInput = this.handleInput.bind(this); this.handleSubmit = this.handleSubmit.bind(this); } handl...
true
e2a31d12db4ad8d92db7ba952ca70f3b8a28bb2e
JavaScript
Dambr/mobile_chat
/chat/ValidateUser.js
UTF-8
2,189
2.515625
3
[]
no_license
const mysql = require('mysql'); module.exports = (Login, Password, RESPONSE) => { let userData; let Rooms; const connection = mysql.createConnection(require('./dbConfig')); new Promise(function(response, reject){ connection.query( "SELECT password FROM users WHERE login =" + "'" ...
true
3abaf9138031cdf7a01db84e1e906cf3caa92c79
JavaScript
cleuton/asyncnode
/routes/index.js
UTF-8
4,087
2.984375
3
[ "Apache-2.0" ]
permissive
/* * Página default: */ var Worker = require('webworker-threads').Worker; var redis = require("redis"); var uuid = require('node-uuid'); exports.index = function(req, res){ res.render('index', { title: 'Operação assíncrona', botao: 'Iniciar' }); }; exports.iniciar = function(req, res) { //va...
true
a88763f2e9f439215c7839faad1eb81f6e8c2205
JavaScript
mhasan96/typeScript-demo
/js/first.js
UTF-8
82
2.796875
3
[]
no_license
"use strict"; const myNumber = 5; console.log("Hello From TypeScript", myNumber);
true
84ae91375abc9cc6fd12a902ec8021dab04d2d21
JavaScript
luckyby/codewar-js-test
/codewar-js-test/test06.js
UTF-8
1,544
3.640625
4
[]
no_license
function list(names) { // let len = names.length; // if (len == 0) { // return ""; // } else if (len == 1) { // return names[0].name; // } else { // let bbb = names.map(e => e.name); // console.log(bbb); // let bbb_f = bbb.slice(0, len - 1); // // console.log(bbb_f); // let ccc = b...
true
d9e4bf6fad9edba03c87bc120ff89dc94a4918ab
JavaScript
MatteoStohlman/SothlmanAcres
/src/CuringRoom/api.js
UTF-8
542
2.609375
3
[]
no_license
var baseURL = 'http://192.168.1.11' export function setOutlet(roomNumber,unit,state){ var requestUrl = baseURL+"/setOutlet?roomNumber="+roomNumber+"&unit="+unit+"&state="+(state?1:0) return fetch(requestUrl,{ method: 'GET', }) .then(response => { ...
true
47f3071222f4e7a8f73772bbebb5ac7295c3bc65
JavaScript
jchaasis/Vamp
/src/components/Marker.js
UTF-8
985
2.6875
3
[]
no_license
import React, { Component } from 'react'; class Marker extends Component { addMarker(lat, long) { // let popup = new window.mapboxgl.Popup({ offset: [0, -15] }) // .setText('poppin') //get request to when point was made // let el = document.createElement('div');...
true
2f9ebef8161ede7a3115652d869d07a67ef60ae3
JavaScript
chauchausoup/dataAlgo
/Test/2.js
UTF-8
494
3.296875
3
[]
no_license
/* var objet={ name:"Krishna", home:{ place:"nana", ghar:"hama" }, last:"dhakal" } for(const item in objet){ console.log(objet[item]) if(objet[item]== "Krishna"){ delete objet[item]; //console.log(item+ " : fuc") } } console.log(objet) */ var s="SOPSROSO...
true
2e1c568df72c8f6f7ac3531ecf7ba4120df9500d
JavaScript
lenninIbarrraGonzalez/JavaScript
/clase21.js
UTF-8
681
3.625
4
[]
no_license
function Persona(nombre, apellido, altura){ this.nombre = nombre this.apellido = apellido this.altura = altura } Persona.prototype.saludar = function(){ console.log(`hola, me llamo ${this.nombre} ${this.apellido}`); } Persona.prototype.soyAlto = function(){ this.altura > 1.8 ? console.log(`${this.nombre} so...
true