Is there any difference between
var obj1 = new Constructor;
and
var obj2 = new Constructor();
given that Constructor
is a constructor function?
Is there any difference between
var obj1 = new Constructor;
and
var obj2 = new Constructor();
given that Constructor
is a constructor function?
According to the MDN docs:
[...] "new foo" is equivalent to "new foo()", i.e. if no argument list is specified, "foo" is called without arguments.