reduce
2022年5月1日小于 1 分钟
reduce
Question
What does the code snippet to the right output by console.log
?
There was a mistake in this problem and Thanks to pinglu85 for pointing it out. It is fixed now.
Snippet
[1,2,3].reduce((a,b) => {
console.log(a,b)
});
[1,2,3].reduce((a,b) => {
console.log(a,b)
}, 0)