News for hackers. Stuff that matters.
Re:Why You Should Always Use === and Other Bad Practices by inglor on Sunday February 09, 2014 @06:36PM (#7208000)
That's stupid, the reason you should not use `for... in` isn't because it's slow, it's because it's reflective.

It's using reflection over object keys to iterate an array. This just happens to work because JavaScript arrays are also objects.

`myArr.forEach(function(el){ // do things here });`

Is perfectly fine.

Re:Why You Should Always Use === and Other Bad Practices by inglor on Sunday February 09, 2014 @06:37PM (#7208005)