Skip to content

Instantly share code, notes, and snippets.

@vicapow
Created March 24, 2013 21:58
Show Gist options
  • Select an option

  • Save vicapow/5233735 to your computer and use it in GitHub Desktop.

Select an option

Save vicapow/5233735 to your computer and use it in GitHub Desktop.
var a = Object.create({foo:"bar"})
Object.keys(a) // returns []
a.prototype // returns undefined
a.__proto__ // returns {foo:"bar"} but nonstandard. the object could have a __proto__ property with a different value
Object.getPrototypeOf(a) // returns {foo:"bar"}
@vicapow
Copy link
Author

vicapow commented Mar 24, 2013

a.foo // returns "bar"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment