Skip to content

Instantly share code, notes, and snippets.

@qetr1ck-op
Last active September 26, 2015 19:51
Show Gist options
  • Save qetr1ck-op/275f8d2485c73f3a365a to your computer and use it in GitHub Desktop.
Save qetr1ck-op/275f8d2485c73f3a365a to your computer and use it in GitHub Desktop.
function Rabbit(name) {}
Rabbit.prototype = {
eats: true
};
var rabbit = new Rabbit();
Rabbit.prototype.eats = false; // (*)
console.log( rabbit.eats ); // (3) ?
//(3) false, rabbit.__prototype.eats references to the same object -> Rabbit.prototype.eat
//aka rabbit.__prototype.eats === Rabbit.prototype.eat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment