[Solved] Equivalent of and in JavaScript?


A googling for “javascript AND operator” returns a first hit of http://www.w3schools.com/js/js_comparisons.asp which clearly explains the answer:

if (i % 3 && 5 === 0)

This is the answer you’re looking for, but given how it’s written, it might not give you the outcome you expect depending on execution.

5

solved Equivalent of and in JavaScript?