indiesquidge / javascript-challenges Goto Github PK
View Code? Open in Web Editor NEWA collection of JavaScript coding challenges
A collection of JavaScript coding challenges
While following this instruction I ran into a wall:
Run node most-recurrent-test.js
to run the test suite in full.
An error was thrown in terminal that read as follows
$ node most-recurrent-test.js
module.js:442
throw err;
^
Error: Cannot find module 'tape'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object. (/Users/Ian/Desktop/codeTests/javascript-challenges/number-frequency/most-recurrent-test.js:1:76)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
I became lost while trying to debug this. Thoughts?
Given this JS object
const george = {
name: 'George Costanza',
age: 37,
skills: undefined,
vocation: null
}
Write me a function that will return a new object (no mutation) with any null or undefined values excluded.
const newGeorge = removeNil(obj)
console.log(newGeorge) // { name: 'George Costanza', age: 37 }
Add in the ability for me to include source objects, similar to the ES6 Object.assign
method.
const art = removeNil(obj, { name: 'Art Vandelay', age: null, vocation: 'architect' })
console.log(art) // { name: 'Art Vandelay', vocation: 'architect' }
I didn't understand this requirement; "if obj.trigger is called with additional arguments it should pass those to the listeners". Could you please provide an example of what is expected?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.