Message from JavaScript discussions

August 2018

— I say this because you should be starting your code with a business objective and only adding code which is designed to satisfy the objective; you dont’t start with a queue or stack before you know why you need one, you just start with a problem you would like to solve

Message permanent page

— 

Unknow reference error: "image" var is not defined, means it fails to run the loop. also you use "i" without declaring it. PS: wear greensock, swim in codepen

— Still, i think the local dev and testing is above all those *pens online

— Is there a difference between array.map and array.foreach

— Map returns array

— Well of course

— A new array !

— What of foreach

— Not necessarily ! You can say ! forEach is a simple for loop for an array !

— Ooh

— It doesn't return anything ! It jist executes the commands for each element in the array !

— But map executes each element in the array and after that returns a new array of same size!