Map Foreach Javascript. forEach() returns the original array whereas R. Syntax and examples