forEach vs map in JavaScript: When to Use Which | DevPrep