cara menerapkan pengurangan ke array kosong di javascript
[].reduce( (previousValue, currentValue) => previousValue + currentValue, 0);
Helpless Hamster
[].reduce( (previousValue, currentValue) => previousValue + currentValue, 0);
[].reduce(function(previousValue, currentValue){
return Number(previousValue) + Number(currentValue);
}, 0);