Array.map() doc javascript code example
Example: 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 ]
let numbers = [1, 2, 3, 4, 5];
let doubles = numbers.map(number => number * 2)
console.log(doubles)
// --> [ 2, 4, 6, 8, 10 ]