Before ES5 and ES6 added such useful features like map, filter, spreading, etc. many developers used a library called underscore.js. Underscore provided many general utility functions to make working with javascript easier.
Once ES5 and ES6 came out, many of these functions were no longer necessary, making underscore obsolete (mostly).
Today, however, underscore has many copy-cats like lodash and Ramda that add many more features than what the original underscore provided.
Your goal for this lab is to create your own utility belt by remaking some classic functions!
Note that it is cheating to just use a ES5 or ES6 function that accomplishes the same thing. For example, implementing map by using Array.prototype.map would be cheating.
However, feel free to reuse your utility functions when implementing other utility functions.
There are 3 difficulty levels:
- Alfred
- Robin
- Batman
Try to complete as many as you can. Aim for the Bat Belt!
If you complete all of those... come talk to me for Joker Mode!
I have provided tests for all of the Alfred exercises. First clone the repo so you have all the files locally. Then run npm install in the root of the project directory to install all dependencies. Finally, to run the tests, run npm test.
Try to make all the tests pass!