0
Gilles
8y

I don't really like the way how JavaScript does a foreach loop. Either you have to use the "for in" loop, or you have to use the "Array.prototype.forEach" function which opens a new scope.

Comments
  • 0
    For in isn't for arrays; its for looping through properties of an object.
  • 0
    Use "for...of", or learn to tame scopes in js. Like with fat-arrow functions.
Add Comment