other?
I saw a video couple of days ago where Brad Traversy explains that, but I can’t remember
"Well, the forEach() method doesn’t actually return anything (undefined). It simply calls a provided function on each element in your array. This callback is allowed to mutate the calling array. Meanwhile, the map() method will also call a provided function on every element in the array. The difference is that map() utilizes return values and actually returns a new Array of the same size."
Return value
Обсуждают сегодня