Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.
I am the chief technical officer at InVision App, Inc - a prototyping and collaboration platform for designers, built by designers. I also rock out in JavaScript and ColdFusion 24x7.
Meanwhile on Twitter
Loading latest tweet...
Ben Nadel at Scotch On The Rocks (SOTR) 2011 (Edinburgh) with:

Lee

Member since Mar 22, 2010

Recent Blog Comments By Lee

  • Javascript's Implicit Boolean Conversions

    Posted on May 18, 2010 at 5:09 PM

    @Han I fully agree with using the || (or ?? in C#) null coalesce operator and I do use it frequently. That makes me wonder why I would prefer if(stringVar.length > 0) over if(stringVar), yet I would prefer alert(stringVar || "Empty!") over the alternative if/else. I suppose it comes down to the... read more »

  • Javascript's Implicit Boolean Conversions

    Posted on Mar 22, 2010 at 10:08 AM

    I would certainly still use if(strValue.length > 0) over if(strValue) simply because I believe it makes the code more self-documenting. Not everyone knows that an empty string evaluates to false. Any developer (hopefully) can look at if(strValue.length > 0) and tell that you're checking for ... read more »