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

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

代码示例2
// 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);