Re: Check null or 0
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: Check null or 0

From: VK <schools_ring@yahoo.com>
Date: Tue Feb 28 2006 - 18:14:04 CET

Jonas Raoni wrote:
> VK wrote:
> > forecast += +(f[i].value)||0;
>
> There's no need for the parenthesis.

Right.

forecast+=+f[i].value||0;

As I said I did not play squeezcrypt for a while :-)

> I saw a lot of people criticizing you here, I thought they just hated
> you, but after reading this message I can see they are totally right
> hahaha ;]

Oh boy, did we get hurt? :-( ;-)
I thought there were enough of smilies in my post to prevent that -
plus nothing personal.

So what the exact reason of *your* hate is? That I explained what did
   forecast+=+f[i].value||0;
do and mean?

It's hard to believe, I know, but it is not so obvious at all to an
average user. Plus some people may prefer to use the conventional
isNaN() check so I thought necessary to mention it.
Received on Mon May 1 03:41:19 2006