{"id":235,"date":"2007-11-23T22:22:12","date_gmt":"2007-11-24T06:22:12","guid":{"rendered":"http:\/\/dylanschiemann.com\/2007\/11\/23\/standards-deviations\/"},"modified":"2007-11-23T22:22:12","modified_gmt":"2007-11-24T06:22:12","slug":"standards-deviations","status":"publish","type":"post","link":"https:\/\/dylanschiemann.com\/?p=235","title":{"rendered":"standards deviations"},"content":{"rendered":"<p>Last month, Microsoft created a document outlining each of the major browser&#8217;s <a href=\"http:\/\/blogs.msdn.com\/jscript\/archive\/2007\/10\/29\/ecmascript-3-and-beyond.aspx\">deviations from the ECMAScript 3 standard<\/a>.  The blog entry links to the <a href=\"http:\/\/wiki.ecmascript.org\/lib\/exe\/fetch.php?id=resources%3Aresources&#038;cache=cache&#038;media=resources:jscriptdeviationsfromes3.pdf\">full 87 page summary<\/a> which is pretty informative.  For example, something as straightforward as parseInt(string, radix) has different behavior across browsers.<\/p>\n<blockquote><p>When radix is 0 or undefined and the string&#8217;s number begins with a 0 digit not followed  by an x or X, then the implementation may, at its discretion, interpret the number either as being octal or as being decimal. Implementations are encouraged to interpret numbers in this case as being decimal.<\/p><\/blockquote>\n<pre><code>\r\nalert(parseInt(\"08\", undefined)); \r\nalert(parseInt(\"08\", 0));\r\nalert(parseInt(\"011\", undefined)); \r\nalert(parseInt(\"011\", 0)); <\/pre>\n<p><\/code><\/p>\n<p>Output:<br \/>\nIE: alerts 0, 0, 9, 9<br \/>\nFF: same as IE<br \/>\nOpera: alerts 8, 8, 11, 11<br \/>\nSafari: same as IE, FF<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last month, Microsoft created a document outlining each of the major browser&#8217;s deviations from the ECMAScript 3 standard. The blog entry links to the full 87 page summary which is pretty informative. For example, something as straightforward as parseInt(string, radix) has different behavior across browsers. When radix is 0 or undefined and the string&#8217;s number [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6,1],"tags":[],"_links":{"self":[{"href":"https:\/\/dylanschiemann.com\/index.php?rest_route=\/wp\/v2\/posts\/235"}],"collection":[{"href":"https:\/\/dylanschiemann.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dylanschiemann.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dylanschiemann.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dylanschiemann.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=235"}],"version-history":[{"count":0,"href":"https:\/\/dylanschiemann.com\/index.php?rest_route=\/wp\/v2\/posts\/235\/revisions"}],"wp:attachment":[{"href":"https:\/\/dylanschiemann.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=235"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dylanschiemann.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=235"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dylanschiemann.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}