I understand that in JavaScript you can write:
if (A && B) { do something }
But how do I implement an OR such as:
if (A OR B) { do something }
Simply use the logical "OR" operator, that is ||.
||
if (A || B)
1.4m articles
1.4m replys
5 comments
57.0k users