{"id":1816,"date":"2022-08-30T15:19:41","date_gmt":"2022-08-30T15:19:41","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/12\/02\/js-error-appearing-only-on-spring-samsung-galaxy-siii-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:19:41","modified_gmt":"2022-08-30T15:19:41","slug":"js-error-appearing-only-on-spring-samsung-galaxy-siii-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/js-error-appearing-only-on-spring-samsung-galaxy-siii-collection-of-common-programming-errors\/","title":{"rendered":"JS error appearing only on Spring Samsung Galaxy SIII-Collection of common programming errors"},"content":{"rendered":"<p>will happen if you apply &#8216;in&#8217; on strings and not on objects i.e.<\/p>\n<pre><code>if ('2' in '.@.') { }\n<\/code><\/pre>\n<p>To find the source of the error, use the following error handling code<\/p>\n<pre><code>window.onerror=function(msg,url,line) {\n    console.log(\"window.error: \" + msg + \", url=\" + url  +\", line=\"+line);\n};\n<\/code><\/pre>\n<p>if you need deeper insight into your code, then try out jsHybugger &#8211; an open source javascript debugger for android apps &#8211; http:\/\/www.jshybugger.org<\/p>\n<p id=\"rop\"><small>Originally posted 2013-12-02 01:41:05. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>will happen if you apply &#8216;in&#8217; on strings and not on objects i.e. if (&#8216;2&#8217; in &#8216;.@.&#8217;) { } To find the source of the error, use the following error handling code window.onerror=function(msg,url,line) { console.log(&#8220;window.error: &#8221; + msg + &#8220;, url=&#8221; + url +&#8221;, line=&#8221;+line); }; if you need deeper insight into your code, then [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1816","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1816","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1816"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1816\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1816"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1816"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1816"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}