The code below is supposed to count the # of 4 in the numbers array. Why does the one with the acc++ not give the expected behavior?
>>> numbers
(7) [1, 2, 3, 4, 5, 4, 4]
>>> numbers.filter(n => n === 4).reduce( (acc, num) => acc = acc + 1, 0)
3
>>> numbers.filter(n => n === 4).reduce( (acc, num) => acc++, 0)
0