Recursion in JavaScript with ES6, destructuring and rest/spread
Hugo Di Francesco
1869

This is very cool. But are you aware that your implementation of map returns an empty list if the first element in the array is false?

map([0, 1, 2], function(n){ return n+1 })
[]

And because it’s recursive, it stops at the first false element in the array.

map([1, 2, 0, 3, 4], function(n){ return n+1 })

[2, 3]