I found a function for the running sum of an array in javascript.
const runningSum = function(nums) {
return nums.map((acc = 0, num => acc += num));
};
For my understanding and according to the definition from MDN is acc := currentValue and num:= Index. But how does that work with the arrow function inside the parameters? I appreciate any help or explantions