Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

es6 map usin index

const array = [1, 2, 3, 4];


const map = array.map((x, index) => {
  console.log(index);
  return x + index;
});

console.log(map);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #map #usin #index
ADD COMMENT
Topic
Name
4+5 =