Easy functional programming in JavaScript with Underscore.js -- part 2
In the previous post I showed how good use of Underscore.js’s map function can substantially increase the quality of your code. This time I’ll explore some other functional collection favourites: reduce, select and all.
Reduce that array over a low heat until thick and creamy Have you ever had to do something like this?
Basically, this is going through some kind of list of values, calculating a new value from each one and accumulating some kind of answer.
skilldrick.co.uk