TLDRIn JavaScript, functions are treated as 'First Class' citizens. A function is fundamentally an object. We can assign properties to a function like 'Namaste' or 'Hello' The forEach function was introduced with ES5 as Array.prototype.forEach and with ES6, it's simply referenced as. Array.map. The map function returns a function applied to every element of the original array.
Table of contents
IntroductionWhat are Higher Order Functions?First-Class CitizensHigher-Order FunctionsArray.forEachArray.mapArray.filterArray.someArray.everyArray.find & Array.findIndexArray.reduce2 Comments
Sort: