javascript-questions icon indicating copy to clipboard operation
javascript-questions copied to clipboard

Answer of question 65 is incorrect

Open Tarabass opened this issue 5 years ago • 2 comments

The first argument that the reduce method receives is the accumulator, x in this case. The second argument is the current value, y. With the reduce method, we execute a callback function on every element in the array, which could ultimately result in one single value.

The first argument of the reduce method is not the accumulator. The first argument of the reduce method is a callback function, also called a reducer function. The first argument of the reducer function, which takes four arguments, is the accumulator,

MDN

Tarabass avatar Jan 19 '20 13:01 Tarabass

Can I work on this issue? @jakeherp @Tarabass

EugeneGohh avatar Mar 29 '21 17:03 EugeneGohh