This is a morning challenge designed to get you feeling more confident with array methods in javascript, via the reduce method.
After this morning challenge you should understand what some of the methods discussed in the challenge do, and be comfortable with at least the basics of how reduce works.
Array methods in general, especially the ones in this challenge are used day in, day out by javascript developers, so they're good to get used to.
You are not expected to complete all of the functions, just do your best.
As a note, rewriting these array methods yourself with reduce is not good
practice for code you're going to use, this is more just a learning exercise.
It's especially sub-optimal for some
and every
(can you think of why?).
In order to do the challenge, clone and cd into the repo, run npm i
, and then
run npm test
and look at the results.
Now, open index.js
, read the comments, and get working on the functions!
Remember to regularly run the tests to see how you're getting on.
Oh, and ask one of the alumni what their favourite function is, see what they say 😉