Russell Tyndall's Tech Blog

The Shizzle Fa Rizzle at Acceleration.net

Home Contact Syndicate this Site (RSS 2.0) Syndicate this Site (Atom) Login
  80 Posts :: 6 Stories :: 69 Comments :: 19 Trackbacks

News

Listed on BlogShares

Archives

Post Categories

Image Galleries

Favorite Web Locations

Tech Tool Links


Since this doesnt seem to be about, I thought I would let the world know.
>[]==false
true

>if([]) print('oh hell')
oh hell

Because of type coersion the [] is == false but still true. You can perform equality checks without coerssion using the '===' and '!==' operator. Woo!!
Also...
>x = new Boolean(false)
false

>if(x) print('oh hell')
oh hell

I guess it all comes down to "Be very explicit"
posted on Tuesday, January 25, 2005 4:05 PM