Skip to content

Instantly share code, notes, and snippets.

@qetr1ck-op
Created September 26, 2015 19:47
Show Gist options
  • Save qetr1ck-op/9b042fd1294bb8529477 to your computer and use it in GitHub Desktop.
Save qetr1ck-op/9b042fd1294bb8529477 to your computer and use it in GitHub Desktop.
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