Device Monitoring Studio - Monitor, log and analyze data coming through PC ports and connections
Download Device Monitoring Studio Hide this button

|| Logical OR Operator

This operator evaluates to non-zero if at least one of if its operands is non-zero, otherwise it evaluates to zero.

Syntax:

exp1 || exp2

Usage:

0 || 0               // evaluates to 0
0 || 2               // evaluates to 1
5 == 5 || 2==3       // evaluates to 1

If exp1 evaluates to a non-zero value, exp2 is not evaluated.