class Polygon {
constructor() {
this.height = 11;
this.width = 22;
}
}
var myObj = {};
myObj.Polygon = Polygon;
console.log((new myObj.Polygon).height)
let Root = {};
Root.Child = {};
class MyClass {
constructor(prop1, prop2) {
this.prop1 = prop1;
this.prop2 = prop2;
}
}
Root.Child.MyClass = MyClass;
var instance = new Root.Child.MyClass('super', 'great');
console.log(instance);