Education Through Minification

While puttering around with JavaScript minification earlier this morning, I noticed this:

if ( a % 5 === 0) { b += “buzz” }

was transformed into this:

a % 5 === 0 && ( b += “buzz”)

I’ve seen similar JavaScript cleverness with the OR operator to either preserve a previously defined object or create a new one if it isn’t already defined, but it never dawned on me a similar thing could be done with an AND operator simulating an if statement.