September 2018
Intermediate to advanced
302 pages
7h 17m
English
There are a number of functions that are higher-order functions and you use them on a daily basis:
someArray.map(function callback(currentValue, index, array){ // Return new element});// or in the shorter formsomeArray.map((currentValue, index, array) => { //... });
someArray.filter(function callback(currentValue, index, array){ // Returns true or false});// or in the shorter formsomeArray.filter((currentValue, index, array) => { //... });
someArray.reduce( function callback(previousValue, currentValue, index, array){ // Returns whatever }, initialValue);// or in the shorter formsomeArray.reduce((previousValue, currentValue, index, ...Read now
Unlock full access