Last active
September 26, 2015 19:51
-
-
Save qetr1ck-op/275f8d2485c73f3a365a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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