Javascript error in IE6/7, no complains in Firefox though

Expected identifier, string or number
Object expected

These errors may occur when browsing a JavaScript enabled website using IE (6 or 7, it doesn’t matter). Where Firefox is happily rendering the page, IE will complain, and generally these two come in tandem, because the script has defined a list or group of functions, and the writer has blithely forgotten that you can’t include a comma at the end of the list; e.g.

var list = { some-value: 0.5, some-value-2: 0.5, }

That innocuous comma at the end results in two errors, because the last comma is a syntax error, and later, when using list you’ll find that is undefined. Perfect. Any decent parser should be able to ignore the bloody comma!