Could you elaborate on this : Map and forEach don't mutate the original array,
As the example suggests, forEach does the operations on the Existing array.
Basically, the callback passed inside the forEach method is performing operations on the existing array and not forEach itself. forEach returns undefined. You can read more here: freecodecamp.org/news/4-main-diffe...
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Could you elaborate on this : Map and forEach don't mutate the original array,
As the example suggests, forEach does the operations on the Existing array.
Basically, the callback passed inside the forEach method is performing operations on the existing array and not forEach itself. forEach returns
undefined
. You can read more here: freecodecamp.org/news/4-main-diffe...