What is the correct syntax to create objects in javascript that will work across the majority of web browsers (by that I mean : IE 6+, Firefox 2+, Opera 9+ )
Is this
You have to use "quotes" around properties that contain anything other than word characters
{foo-bar: 3} // invalid {"foo-bar": 3} // valid
Other than that there is no difference between the two and I'd imagine both ways work across all browsers