Retrieving Property Names with Object.getOwnPropertyNames and Object.keys

added by JavaScript Kicks
9/8/2014 11:26:20 AM

159 Views

In past versions of JavaScript it was fairly painful to figure out what properties an object possessed. Essentially you would need to manually iterate over the object and filter out inherited properties, but with ECMAScript 5 we get access to Object.keys which eliminates this tedious boilerplate.


0 comments