📜  如何在js中将数组数据加倍 - Javascript代码示例

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

代码示例1
function double (arr){
    let newArr = [];
    for(let i = 0; i < arr.length; i++){
        newArr.push(arr[i] * 2);
    }
    console.log(newArr) ;
}
console.log(double([3,4,5]));