What goes in the blank?
// sum every number in the array const total = nums.____((a, b) => a + b, 0);
Answer: reduce
reduce folds the array into one value, starting from the given seed.// sum every number in the array const total = nums.____((a, b) => a + b, 0);
Answer: reduce
reduce folds the array into one value, starting from the given seed.