4 ms·
I stopped reading after this: let modifiedArr = arr.map(element => element * 10); console.log(modifiedArr); Cool right :) ... let modifiedAarr = arr.
by qualitytime 9y ago
I stopped reading after this:
let modifiedArr = arr.map(element => element * 10);
console.log(modifiedArr);
Cool right :)
...
let modifiedAarr = arr.filter((element, index) => element%2 == 0)
Hope you got it. And don’t forgot to notice, only the first parameter is mandatory. Other two parameters are optional.
Array Reduce