var sum = [0, 1, 2, 3].reduce(function (a, b) { return a + b; }, 0); // sum is 6. Copy to Clipboard. 另外,也可以寫成箭頭函式:.
確定! 回上一頁