Below code,
function myFunc(theObject) {
theObject.brand = "Toyota";
}
adds a member with property name myFunc
in window
object.
> window['myFunc']
function myFunc()
For below code,
class Polygon {
constructor(height, width) {
this.height = height;
this.width = width;
}
}
How does Polygon
get stored in window
object?