var Dictionary = {
foo: "bar"
}
alert(Dictionary.foo)
This works fine in Firefox 6, but not in IE8, is there a syntax error that FF is displacing, or do I need an IE fix?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This example does work in IE8 – at least for me. I’m running on a Windows XP SP 3 with the latest IE8.
If you have problems with some Object-notations, check if your key is named like keywords which are specified in JavaScript, like
classand aren’t defined as a String (you need to write it as"class". Otherwise missing colons are often a source of errors.