loading
open in
index.js
1
2
3
4
5
6
7
8
const myArray = [11,21,33,100];

const doubledArray = myArray.map(function(el,ind,arr){
  console.log(`element is ${el}, index is ${ind}, whole array is ${arr}`);
  return el*2;
})

console.log(doubledArray)
node v10.15.2 linux/amd64