6

Is there any difference between

var obj1 = new Constructor;

and

var obj2 = new Constructor();

given that Constructor is a constructor function?

Matt Fenwick
  • 48,199
  • 22
  • 128
  • 192

1 Answers1

6

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.

Matt Fenwick
  • 48,199
  • 22
  • 128
  • 192