using below flatten function as example, why cant I use return directly on the accumulator. Push()
return
function flatten(array){ return reduce(arr
The push method returns the new length of the Array.
push
MDN documentation for push
The concat method returns a brand new array containing a combination of the two arrays.
concat
MDN documentation for concat