Skip to content

Instantly share code, notes, and snippets.

@kovaldn
Created December 5, 2013 06:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kovaldn/7801078 to your computer and use it in GitHub Desktop.
Save kovaldn/7801078 to your computer and use it in GitHub Desktop.
var userB = {
sayHello: function() {
console.log('Hello '+ this.name);
}
};
var bob = Object.create(userB, {
'id' : {
value: MY_GLOBAL.nextId(),
enumerable:true // writable:false, configurable(deletable):false by default
},
'name': {
value: 'Bob',
enumerable: true
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment