Objects created by calling constructor function Point have properties x and y, and inherit a property dimensions through the prototype chain:
// constructor function Point
function Point(x,y) {
this.x = x;
this.y = y;
}
// Point.prototype has property dimensions
Point.prototype.dimensions = 2;
// p will inherit dimensions
var p = new Point(10, 20);
What will be printed if we access p.dimensions after calling delete on it?
// delete is called
delete p.dimensions;
// what will be logged?
console.log(p.dimensions);