<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Comments on snippet: 'Test for Even / Odd Numbers in Javascript'</title>
<link>http://snipplr.com</link>
<description>Snipplr comments feed'</description>
<language>en-us</language>
<pubDate>Fri, 24 May 2013 11:44:58 GMT</pubDate>
<item>
<title>gauthamvit said on 7/16/11</title>
<link>http://snipplr.com/view/13487/test-for-even--odd-numbers-in-javascript/</link>
<description><![CDATA[ I came across http://rindovincent.blogspot.com/p/javascript.html where there was a simple Javascript program to find whether the number is odd or even. I am pasting the same code with permission here.




var n = prompt("Enter a number to find odd or even", "Type your number here");
n = parseInt(n);
if (isNaN(n))
{
alert("Please Enter a Number");
}
else if (n == 0)
{
alert("The number is zero");
}
else if (n%2)
{
alert("The number is odd");
}
else
{
alert("The number is even");
} ]]></description>
<pubDate>Sat, 16 Jul 2011 08:22:09 GMT</pubDate>
<guid>http://snipplr.com/view/13487/test-for-even--odd-numbers-in-javascript/</guid>
</item>
<item>
<title>soldner said on 9/25/10</title>
<link>http://snipplr.com/view/13487/test-for-even--odd-numbers-in-javascript/</link>
<description><![CDATA[ Nice, just what I needed.  Thanks! ]]></description>
<pubDate>Sat, 25 Sep 2010 01:40:11 GMT</pubDate>
<guid>http://snipplr.com/view/13487/test-for-even--odd-numbers-in-javascript/</guid>
</item>
</channel>
</rss>