Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript array map

const array = [1, 4, 9, 16];

const arrayWithMultipliedElems = array.map(elem => elem * 2);

console.log(arrayWithMultipliedElems); // [2, 8, 18, 32]
Source by medium.com #
 
PREVIOUS NEXT
Tagged: #javascript #array #map
ADD COMMENT
Topic
Name
8+6 =