I need to have a class inside an object, to be used with dot notation. Is it possible?
Are there any other ways to achieve the same result?
Example:
const Obj {
info(i) { console.log(i); },
class Num {
constructor(n) {
this.n = n || 5;
}
run() {
console.log(this.n);
}
}
}
const n = new Obj.Num();