From Map/Reduce to JavaScript Functional Programming

added by JavaScript Kicks
2/2/2015 2:18:00 PM

371 Views

Since ECMAScript 5.1, `Array.prototype.map` & `Array.prototype.reduce` were introduced to major browsers. These two functions not only allow developers to describe a computation more clearly, but also to simplify the work of writing loops for traversing an array; especially when the looping code actually is for mapping the array to a new array, or for the accumulation, checksum, and other similar reducing operations.


0 comments