I'm learning JavaScript and I'm unclear on the different syntax used to define objects. What is the difference (if any) between defining an object like this:
var myObject = {}
and like this:
var myObject = new Object();
In the admittedly fairly straightforward examples I've worked on I can't yet see a difference in behaviour between the two. It seems to be possible to access and manipulate both objects in the same ways. However, I see both examples used so I assume there is some difference between the two.