Delete

delete can be used to remove a property from an object. It will remove a property from the
object if it has one. It will not look further in the prototype chain.
Removing a property from an object may allow a property from the prototype chain to shine through:

  1. var adult = {age:26},
  2. child = Object.create(adult);
  3. child.age = 8;
  4. delete child.age;
  5. /* Remove age property from child, revealing the age of the prototype, because then it is not overriden. */
  6. var prototypeAge = child.age;
  7. // 26, because child does not have its own age property.