📜  JavaScript 数组方法 .map() - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:34.896000             🧑  作者: Mango

代码示例1
let numbers = [1, 2, 3, 4, 5];
let doubles = numbers.map(number => number * 2)
console.log(doubles)
// --> [ 2, 4, 6, 8, 10 ]