Following is my Class, Its prototype vale is not getting changed, (I am working on the Chrome console)
class Rectangle {
constructor(length, width) {
this.length = length;
this.width = width;
}
getArea() {
return this.length * this.width;
}
static create(length, width) {
return new Rectangle(length, width);
}
}
and I am Changing the prototype of the Class to null
Rectangle.prototype= null
When I try to access the changed Prototype, the value remains the same "Object" with 'getArea' prototype property of Rectangle
But in ES5 the prototype value is changed.