On 6 Mar 2007, at 23:37, porneL wrote:
Your browser may have parsed it, I dunno. I didn't try it. But with an editor that relies on regular expressions to match syntax, something as small as this would probably throw it off.
As in Perl that comma is optional. Makes it easier to extend lists.
Unfortunately ECMAScript specification really forbids commas in such places.
So I see. Although strangely a trailing comma is allowed in array literals.
If we're being pedantic though Michael referred to JavaScript and it's not a syntax error in SpiderMonkey. Of course you could argue that that's a bug in SpiderMonkey and I'd probably just shut up at that point :)