或是為每個陣列元素遞增,而原陣列也會因為 forEach() 所帶入的函式而改變原有的陣列。 data.forEach(function(value, index, array){ array[index] = value + 1; }); ...
確定! 回上一頁