{"id":1067,"date":"2010-09-13T12:03:37","date_gmt":"2010-09-13T06:33:37","guid":{"rendered":"http:\/\/JitendraZaa.com\/blog\/?p=1067"},"modified":"2010-09-13T12:03:37","modified_gmt":"2010-09-13T06:33:37","slug":"javascript-error-expected-identifier-string-or-number-in-internet-explorer-ie","status":"publish","type":"post","link":"https:\/\/www.jitendrazaa.com\/blog\/webtech\/web\/javascript-error-expected-identifier-string-or-number-in-internet-explorer-ie\/","title":{"rendered":"JavaScript Error &#8220;\u02dcexpected identifier, string or number&#8217; in Internet Explorer (IE)"},"content":{"rendered":"<p>Yesterday my friend come across a  javascript error &#8220;<strong>expected identifier, string or number<\/strong>&#8221; in internet explorer (IE). The same code was running great in Mozilla and chrome. here the snap of code causing an error:<\/p>\n<p><!--more--><\/p>\n<pre class=\"brush: jscript; highlight: [22]; title: ; notranslate\" title=\"\">\nvar horizontalTab = {\n&quot;MyProducts&quot; :  &#x5B;\n\t\t\t\t\t{\n\t\t\t\t\t\t&quot;ImageName&quot; : &quot;my_products.png&quot;,\n\t\t\t\t\t\t&quot;SelectedImageName&quot; : &quot;my_products_selected.png&quot;,\n\t\t\t\t\t\t&quot;HoverImageName&quot; : &quot;myProductsHowerbottom.png&quot;\n\t\t\t\t\t}\n\t\t\t\t],\n&quot;MyTeam&quot; :  &#x5B;\n\t\t\t\t{\n\t\t\t\t\t&quot;ImageName&quot; : &quot;my-team-white_bottom.png&quot;,\n\t\t\t\t\t&quot;SelectedImageName&quot; : &quot;my-team-bottom.png&quot;,\n\t\t\t\t\t&quot;HoverImageName&quot; : &quot;myTeamBottomHover.png&quot;\n\t\t\t\t}\n\t\t\t],\n&quot;MyFinance&quot; :   &#x5B;\n\t\t\t\t\t{\n\t\t\t\t\t\t&quot;ImageName&quot; : &quot;finance_white-legal-Bottom.png&quot;,\n\t\t\t\t\t\t&quot;SelectedImageName&quot; : &quot;finance-legal-bottom.png&quot;,\n\t\t\t\t\t\t&quot;HoverImageName&quot; : &quot;FinancenLegalHoverBottom.png&quot;\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t }\n<\/pre>\n<p>The javascript debugger displayed the error on function which does not have to do anything with actual cause. Luckily we observed the <strong>line 22, extra comma <\/strong>present at last declaration in <strong>JSON <\/strong>was causing this error.<\/p>\n<p>I hope this article will help lots of people if they came across same problem and save hours.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Solution of expected identifier, string or number&#8217; in Internet Explorer (IE) &#8211; javascript<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"jz_research_post":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[26],"tags":[338,121,126],"class_list":["post-1067","post","type-post","status-publish","format-standard","hentry","category-web","tag-web","tag-intenet-explorer","tag-javascript"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":4618,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/most-frequently-used-code-snippets-for-salesforce-developers-faq-part-21\/","url_meta":{"origin":1067,"position":0},"title":"Salesforce Developers interview questions &#8211; Most commonly used code snippets &#8211; part 21","author":"Jitendra","date":"July 7, 2015","format":false,"excerpt":"Salesforce interview questions - Most frequently used Apex and visualforce code used by Salesforce developers like \"How to query and abort scheduled job using Apex\", \"Defining VF page as HTML5\", \"Visualforce page as JSON\" , \"Handling colon in element Id for Jquery\" , \"Chatter using Apex\" and many more.","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5602,"url":"https:\/\/www.jitendrazaa.com\/blog\/webtech\/tips-to-effectively-use-google-chrome-developer-tool\/","url_meta":{"origin":1067,"position":1},"title":"Tips to effectively use Google chrome developer tool","author":"Jitendra","date":"July 29, 2016","format":false,"excerpt":"While building Lightning Components in Salesforce, how to effectively use Google chrome developer tools to troubleshoot and analyze issue","rel":"","context":"In &quot;Web Technology&quot;","block_context":{"text":"Web Technology","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/webtech\/"},"img":{"alt_text":"Chrome Dev tools","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2016\/07\/Chrome-Dev-tools.png?fit=600%2C400&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2016\/07\/Chrome-Dev-tools.png?fit=600%2C400&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2016\/07\/Chrome-Dev-tools.png?fit=600%2C400&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":2173,"url":"https:\/\/www.jitendrazaa.com\/blog\/webtech\/web\/create-pure-css-based-menu-step-by-step-tutorial\/","url_meta":{"origin":1067,"position":2},"title":"Create Pure CSS based Menu &#8211; Step by Step Tutorial","author":"Jitendra","date":"May 23, 2011","format":false,"excerpt":"Tutorial on creating step by step pure CSS based Menu without any javaScript and Why CSS Hover property is not working in Internet explorer","rel":"","context":"In &quot;HTML&quot;","block_context":{"text":"HTML","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/webtech\/web\/"},"img":{"alt_text":"Pure CSS based menu","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/05\/Pure-CSS-based-menu.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":4683,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/barcode-scanner-component-in-salesforce-lightning-video\/","url_meta":{"origin":1067,"position":3},"title":"Barcode scanner component in Salesforce lightning &#8211; Video","author":"Jitendra","date":"July 11, 2015","format":false,"excerpt":"Recording of Live code - Creating Barcode decoder component using Javascripyt library in Salesforce Lightning","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Barcode Scanner Lightning App","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2015\/07\/Barcode-Scanner-Lightning-App.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":7157,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/how-to-show-content-of-proxy-object-in-lightning-web-component\/","url_meta":{"origin":1067,"position":4},"title":"Fix Error &#8220;Cannot assign to read only property&#8221; and print Proxy Object of LWC","author":"Jitendra","date":"July 29, 2020","format":false,"excerpt":"Quick code snippet to read content of Proxy object in Lightning web component & resolve error Cannot assign to read only property","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2987,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/salesforce-interview-questions-part-10\/","url_meta":{"origin":1067,"position":5},"title":"Salesforce Interview Questions \u2013 Part 10","author":"Jitendra","date":"August 2, 2012","format":false,"excerpt":"This Part of Salesforce interview question series depict on browser compatibility issue (Internet Explorer 9) and Visualforce normally for AJAX, Group By and Having Clause. 91. How to add the Document Header in Visualforce page? Ans : Directly there is no way to add the document type in visualforce. However\u2026","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/1067","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/comments?post=1067"}],"version-history":[{"count":0,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/1067\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/media?parent=1067"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/categories?post=1067"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/tags?post=1067"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}