Array method exercises online

Hi,

Anyone know of any resources that have a load of exercises for the commonly used array methods (reduce, sort, map etc). I’ve done some of the Wes Bos array cardio stuff, but struggling to find much else. The below is another example of what I’m after, just something a bit more comprehensive would be nice.

Thanks

Have you checked codewars? It is not specific to array methods, but you can solve many things with reduce if you have a bit of creativity

I don’t know how far you are into FCC curriculum, but I found that functional programming section hammered those topics in very well, specially the exercises where we have to implement our versions of filter and map - those really helped me understand how these functions work.

I’ve dabbled in code wars a bit, but find the UI clunky and finding the right challenges a bit of a chore.

I’ve not had a go at the functional programming section tbf so will check that out. I understand the concepts relatively well, just wanted the volume to really hammer it home with some more complex challenges if possible.

Would have thought there would be a big library of little exercises in a GitHub repo somewhere, but doesn’t seem the case.

One suggestion is to redo all the Basic JavaScript, Basic Algorithm, and Intermediate Algorithm sections try using only higher order array methods. It can be done (I refactored most of them that way as a challenge to myself a while back). It must be noted that sometimes it is much cleaner code just to use a basic for loop or for…in or for…of loop instead of one of the array methods, but it could be just the challenge you need to solidify your understanding of how to use them.

1 Like