Question d’entretien chez GitLab

Difference between .forEach and .map?

Réponse à la question d'entretien

Utilisateur anonyme

12 mai 2019

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