📜  javascript 地图数组 - Javascript 代码示例

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

代码示例6
var numbers = [1, 4, 9];
var doubles = numbers.map(function(num) {
  return num * 2;
});
// doubles is now [2, 8, 18]. numbers still [1, 4, 9]