Skip to content

Comment on A re-introduction to JavaScriptparent

Comments

Yeah and not a big fan of them saying you can do for...in on an array while casually mentioning the limitation of doing such. I would consider it far better practice to NEVER iterating over an array with for...in.

Is there even any guarantee it would be iterated in the correct order?

Nope. Then again if you're doing a for...in you probably don't care about order.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.