In this video, I will show you everything you need to know about widely used and most popular higher order functions i.e. map, reduce and filter. You can simplify your javascript code by using map(), reduce() and filter() functions.
Map, reduce and filter all are array methods in javascript, each method iterates over an array and perform calculations.
Example used in video:
let a = [1,2,3,4,5];
Map:
a.map(function(number){ return number*10; });
// returns [10,20,30,40,50]
// Reduce
a.reduce(function(acc,value){ return acc+ val; });
// 15
//Filter
a.filter(function(number){ return number%2 == 0; });
// [2,4]
Nesta página do site você pode assistir ao vídeo on-line Map, Reduce & Filter Functions in JavaScript | Higher Order Functions duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Codingflag 27 Julho 2020, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 1,700 vezes e gostou 51 espectadores. Boa visualização!