Javascript ||, how to compare multiple variables value?

Posted by Fernando SBS on Stack Overflow See other posts from Stack Overflow or by Fernando SBS
Published on 2010-05-24T21:07:55Z Indexed on 2010/05/24 21:11 UTC
Read the original article Hit count: 239

Filed under:
|
|

How to right this syntax correctly:

if (tipoTropaPrioritaria[m] || troopsCount[m] || availableTroops[m]) == ("null" || "undefined") {

...

}

(to check if any of the first 3 variables is null or undefined)

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about operators