📌  相关文章
📜  从对象数组中获取所有 id javascript 代码示例

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

代码示例3
//Getting One Value from an Array of Items or sum of array
var numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
var total = numbers.reduce(function(total, current) {
    return total + current;
}, 0);

console.log(total);