1 2 3 4 5 6 7 8 9 10 11 12 13
const objs = []; class Foo { foo() { return "foo"; } } setInterval(() => { objs.push(new Foo()); }, 1000); console.log("hello!");