Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript map

const originals = [1, 2, 3];

const doubled = originals.map(item => item * 2);

console.log(doubled); // [2, 4, 6]
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #javascript #map
ADD COMMENT
Topic
Name
4+8 =