I have a question same with title
when i use reduce(),
array.reduce((acc, current) => {
return acc++}, 0)
…final return acc value is 0
, not changed…
but, I replaced acc++
with acc += 1
, and It work!!!
so, I wanna know what is different ++ and += 1