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: 237
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