What's the difference between
var obj = new factoryCreation;
and
var obj = new factoryCreation();
in javascript.
Are these one and the same??
Assume factoryCreation
is a function.
What's the difference between
var obj = new factoryCreation;
and
var obj = new factoryCreation();
in javascript.
Are these one and the same??
Assume factoryCreation
is a function.
The MDN Web Docs says:
new Foo is equivalent to new Foo(), i.e. if no argument list is specified, Foo is called without arguments.