Associative arrays

21 March 2007   1 comment   Web development

Powered by Fusion×

For hard cord Javascript developers this comes as no surprise but if you, like me, do all your work in Firefox (of course with Firebug installed) then you need to keep a close eye on the correctness of your Javascript syntax because Internet Explorer will have some difference ways of thinking about it. Here's what I learnt the other day. This works perfectly in Firefox:

var person = { age:27, name:"Peter", };

But if you run that in IE you get "Expected identifier, string or number".

I know that SQL raises syntax errors on trailing commas but Python sure doesn't and I like that.

What a pointless rant this was. More like a note to self that might hopefully help someone else some day.



Thank you for bringing this up.

I did pull some hairs before finding your post.

Your email will never ever be published

Related posts

Zope Image to filesystem image 16 March 2007
Learning about ATFolder's security 22 March 2007
Related by keywords:
Button tag in bloody Internet Explorer 09 August 2005
Why I gave up on JQuery UI's autocomplete 20 October 2010
What makes my website slow? DNS 23 October 2009 doesn't work in Firefox (on Linux) 19 March 2008
Javascript tip: nifty use of the console.log function in Firebug 07 November 2010 incompatible to Mozilla 23 July 2004
Jaguar cars website 24 May 2004
Do you know about Firefox? 01 November 2004
Strange language bug in Windows XP 16 January 2006
IssueTrackerProduct feature list 02 December 2005
YSlow grade A (96) but not with doubts 06 August 2007