5

Possible Duplicate:
new MyClass(); vs new MyClass;

Please see comments below

When creating a new instance of an object, what is the difference between A and B below

A, using brackets

var foo = new Bar();

B without brackets

var foo = new Bar;

I am using backbone.js where many examples do not use brackets. Also, what is the correct terminology to call the ()'s? Execute?

Community
  • 1
  • 1
Ross
  • 14,266
  • 12
  • 60
  • 91
  • Remarkably similar duplicate, and the answer you linked to has a much more complete answer. There should be some way of aliasing question names so that one question may have multiple names to increase the chances of a search hitting the questions. – Ziggy Jul 15 '11 at 19:00

0 Answers0