I created an object that worked fine with FF, but led to an error with IE (expected identifier, string or number)
var a={text:'abc',class:'def'};
After researching the litter, I found the class a reserved word. Quoting the word “class” fixed the problem.
var a={text:'abc',"class":'def'};
Is it always recommended that you provide an object name to resolve these errors?
thank
source
share