Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.
Ben Nadel at Scotch On The Rock (SOTR) 2010 (London) with: Matt Gifford
Ben Nadel at Scotch On The Rock (SOTR) 2010 (London) with: Matt Gifford@coldfumonkeh )

Aaron Heimlich

Member since Dec 11, 2008

Recent Blog Comments By Aaron Heimlich

  • Javascript Will Assign And Test A Variable In The Same Statement

    Posted on Apr 9, 2007 at 10:08 AM

    @Ben: It seems (through some experimentation on the Firebug console) that if neither b or c are truthy, then a gets set to b. var b = null; var c = false; var a = b && c // a = null var b = true; var c = false; var a = b && c // a = false... read more »

  • Javascript Will Assign And Test A Variable In The Same Statement

    Posted on Apr 1, 2007 at 12:55 AM

    Somewhat related: Instead of: var target = null; if(event.target) { // DOM2 event property target = event.target; } else { // IE proprietary event property target = event.srcElement; } Do: var target = event.target || event.srcElement; You can do this with && too: var messag... read more »