|
|
|
|
|
by agilebyte
4694 days ago
|
|
I would just say that there are big differences between a JS `for` loop (`for in` in CS) and an ES5 `forEach`. The fact that you are creating a new function scope and are not returning all elements as you might expect: arr = new Array 3
arr.push 4
( alert el for el in arr )
arr.forEach alert
|
|