Frage im Vorstellungsgespräch bei GitLab

Difference between .forEach and .map?

Antwort im Vorstellungsgespräch

Anonym

12. Mai 2019

.forEach loops over each item on an array. .map loops through all items of an array and returns a new array.