<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: JavaScript WTF</title>
	<link>http://lucumr.pocoo.org/cogitations/2008/04/24/javascript-wtf/</link>
	<description>Armin Ronacher thinking</description>
	<pubDate>Sat, 11 Oct 2008 11:59:23 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2</generator>

	<item>
		<title>By: schmichael</title>
		<link>http://lucumr.pocoo.org/cogitations/2008/04/24/javascript-wtf/#comment-4217</link>
		<author>schmichael</author>
		<pubDate>Fri, 25 Apr 2008 15:32:46 +0000</pubDate>
		<guid>http://lucumr.pocoo.org/cogitations/2008/04/24/javascript-wtf/#comment-4217</guid>
		<description>I've always just used the + operator to coerce strings to ints:

+"09" == 9
+"0100" == 100

Is there some advantage to parseInt?</description>
		<content:encoded><![CDATA[<p>I&#8217;ve always just used the + operator to coerce strings to ints:</p>
<p>+&#8221;09&#8243; == 9<br />
+&#8221;0100&#8243; == 100</p>
<p>Is there some advantage to parseInt?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jj</title>
		<link>http://lucumr.pocoo.org/cogitations/2008/04/24/javascript-wtf/#comment-4128</link>
		<author>Jj</author>
		<pubDate>Thu, 24 Apr 2008 19:20:41 +0000</pubDate>
		<guid>http://lucumr.pocoo.org/cogitations/2008/04/24/javascript-wtf/#comment-4128</guid>
		<description>I got this message in the Javascript console in Firefox 3b5 for eval('09')
"""
Warning: 09 is not a legal ECMA-262 octal constant
Source File: javascript:%20eval('09')
Line: 1
Source Code:
09
"""

While parseInt('09') just displayed "0" silently, so it does recognize the error</description>
		<content:encoded><![CDATA[<p>I got this message in the Javascript console in Firefox 3b5 for eval(&#8217;09&#8242;)<br />
&#8220;&#8221;"<br />
Warning: 09 is not a legal ECMA-262 octal constant<br />
Source File: javascript:%20eval(&#8217;09&#8242;)<br />
Line: 1<br />
Source Code:<br />
09<br />
&#8220;&#8221;"</p>
<p>While parseInt(&#8217;09&#8242;) just displayed &#8220;0&#8243; silently, so it does recognize the error</p>
]]></content:encoded>
	</item>
</channel>
</rss>
