Surprise! JavaScript Guard Clauses

I spent more time then I had planned this weekend debugging an issue in some code I wrote, and at the end of it all, discovered a JavaScript language feature that I had read about a while ago but never used (intentionally, that is). To explain, consider the following predicate function definition (and yes, I know that Underscore has this function - my specific case would have brought in some additional concepts, so I’m simplfying here).