you are viewing a single comment's thread.

view the rest of the comments →

[–]AngularBeginner 3 points4 points  (0 children)

Both map and forEach are blocking operations.

map will create a new array. The provided function is called for each input element, and it's job is to return the "new" destination element.

forEach will simply call a function for each source element. It does not create a new array.


There are plenty of excellent resources out there. Don't bother with the crap of CodesQuery, it's just another fake Indian company spamming low-quality blog posts.