Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

JavaScript Array Methods .map()

let numbers = [1, 2, 3, 4, 5];
let doubles = numbers.map(number => number * 2)
console.log(doubles)
// --> [ 2, 4, 6, 8, 10 ]
Source by github.com #
 
PREVIOUS NEXT
Tagged: #JavaScript #Array #Methods
ADD COMMENT
Topic
Name
1+3 =