3 ms·
If you use Array.map (or underscore's map, etc.) then you won't run into this problem. The functional programmer in me gets a little angry whenever I see a for
by actsasbuffoon 13y ago
If you use Array.map (or underscore's map, etc.) then you won't run into this problem. The functional programmer in me gets a little angry whenever I see a for loop in a language that supports higher order functions.
- malandrew 13y agoI just wish JavaScript map was more powerful. I like that underscore's map provides a bit more information passed to the mapped function. It would also be nice if there was an object map function built into the language as well. Again underscore has a solution but the core prototypical functions lack here. It would be awesome if many of the solutions in underscore and other high quality functional libraries could be added to the native prototypes.