function Shape(X,Y) {
this.X = X;
this.Y= Y;
}
function Rectangle(Name,Desc,X,Y) {
Shape.call(this, X, Y);
this.Name = Name;
this.Desc = Desc;
}
var Z = new Rectangle('Rectangle', '',25,25);
Z.ABC = '123';
The problem is, the Z.ABC is not the variable under the function Shape and Rectangle, it should hit error because ABC is not the variable under shape and rectangle function.
How to disable unknown variable, not allow to declare unknown variable outside the function ?