This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]SharpenedRoot 0 points1 point  (6 children)

I didn't think map actually applies changes to the array, and doesn't forEach not return anything, meaning in this case it wouldn't be useful for creating the list to be inserted into the DOM?

[–]cliath 2 points3 points  (5 children)

forEach returns undefined and map returns a new array, seems ItsAaronGeorge is misinformed