News for hackers. Stuff that matters.
Re:Advanced objects in JavaScript by wging on Sunday August 24, 2014 @07:27PM (#8219991)
> You can use Object.getOwnPropertyNames to get all the properties defined on an object. This might be a nice alternative to a for in loop.

Careful. These have different behavior for own properties which are not enumerable. A for-in loop doesn't include them, but Object.getOwnPropertyNames does.

Re:Advanced objects in JavaScript by TazeTSchnitzel on Monday August 25, 2014 @06:28AM (#8221203)
Right Object.keys(foo) is better.
Re:Advanced objects in JavaScript by btipling on Monday August 25, 2014 @11:35AM (#8222215)
And I also missed out on including this, thank you.
Re:Advanced objects in JavaScript by btipling on Monday August 25, 2014 @11:35AM (#8222214)
Nice catch, I will update the blog post.