News for hackers. Stuff that matters.
Re:Wait, What? by aquarion on Thursday May 30, 2013 @08:56AM (#5792158)
Because Math.random's expensive and you don't want to execute it unless you're sure.
Re:Wait, What? by drharris on Thursday May 30, 2013 @09:00AM (#5792174)
Expensive only really matters in a loop. And this logical operator would short circuit anyway.
Re:Wait, What? by masklinn on Thursday May 30, 2013 @09:18AM (#5792265)
The && operator short-circuits, if `!_ok` Math.random won't be called at all.