Can we omit parentheses when creating an object using the “new” operator?

前端 未结 6 2083
清酒与你
清酒与你 2020-11-22 00:41

I have seen objects being created this way:

const obj = new Foo;

But I thought that the parentheses are not optional when creating an objec

6条回答
提交回复
热议问题