Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript map

const numbers = [2, 4, 6, 8];
const result = numbers.map(a => a * 2);
console.log(result);
//Output: [ 4, 8, 12, 16 ]
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #javascript #map
ADD COMMENT
Topic
Name
4+7 =