6

Is there any difference between

var obj1 = new Constructor;

and

var obj2 = new Constructor();

given that Constructor is a constructor function?

Matt Fenwick
  • 46,727
  • 21
  • 123
  • 189

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
  • 46,727
  • 21
  • 123
  • 189