Skip to main content
Ben Nadel at InVision In Real Life (IRL) 2018 (Hollywood, CA) with: Ryan Scheuermann
Ben Nadel at InVision In Real Life (IRL) 2018 (Hollywood, CA) with: Ryan Scheuermann ( @rscheuermann )

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 »

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel