Art Of Programming

musings by Dmytrii Nagirniak

IE Error - Expected Identifier, String or Number

I spent two days for this error. Everything works just fine in Firefox. It doesn’t in IE. When I had found the cause of the problem I remembered how often my mom told me to be attentive. Compare the Javascript code: var root = { name: "hello world", } with this one: var root = { name: "hello world" } See the error? Can you imagine such a mistake in a large file? I like JavaScript a lot, but I hate how much it is (and me) error prone. I hope I have learned the lesson.

Comments

Anonymous
Thanks!
matt
Thank you man! I am quite new to JS and you saved me one sleepless night on coffes with your post =)
franklt69
Yes dmitriy I am using ExtJS v2 and eco for (Enterprise Core Objects)

regards
Frank
Dmytrii Nagirniak
I’m not writing lots of JS, but Aptana IDE is the best one for me.

What do you mean sayng Ext2 + eco?
Is Ext2 for ExtJS v2 and eco for (Enterprise Core Objects)?
franklt69
Hi, Dmitriy is sad spent two days, I spent many time in that also, the error is in “hello world”, it “,” don’t work in IE, I am using Ext2 + Eco, how javascript editor I am using IntelliJ IDEA and many other errors the IDE report its, but if I forget “,” I get this error. Which IDE to JS are you using?

regards
Frank

Comments