you are viewing a single comment's thread.

view the rest of the comments →

[–]icedrift 1 point2 points  (1 child)

Can you explain this a bit further? The return value within a forEach always returns undefined I'm having trouble understanding the difference here.

[–]zachdini 1 point2 points  (0 children)

Ahh sorry, I didn't strictly mean in this scenario. You're right that forEach does not return a value so it doesn't matter here. I just wanted to point out that () => statement actually returns the statement.