There's no difference. Parentheses are optional when using a function as a constructor (i.e. with the new
operator) and no parameters. When not using the new
operator, parentheses are always required when calling a function.
As noted in another answer, it's generally preferable to use an object literal instead. It has the following advantages over using the Object
constructor:
- Allows concise initialization of properties (e.g.
var foo = { bar: "cheese" };
)
- Shorter
- Possibly faster
- Unaffected in the (unlikely) event of the
Object
function being overwritten.