Created
September 26, 2015 19:47
-
-
Save qetr1ck-op/9b042fd1294bb8529477 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(); | |
delete rabbit.eats; // (*) | |
console.log( rabbit.eats ); // (4) ? | |
//(4) true, rabbit doesn't have property eats | |
//Object.hasOwnProperty(rabbit.eats) -> false | |
//it is taken from prototype object |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment