📜  如何从javascript代码示例中的左侧开始减去数组中的数字

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

代码示例1
// How to Subtract the numbers in the array, starting from the left in javascript
let numberSubtract = [325, 25, 100];
let resultSubtract = numberSubtract.reduce((a, b) => a - b);
console.log(resultSubtract);