&
— Logical AND (AND)
&&
— Shorthand AND
|
— Logical OR (OR)
||
— Shorthand OR
^
— Logical XOR (exclusive OR (OR))
!
— Logical unary NOT (NOT)
&=
— AND with assignment
|=
— OR with assignment
^=
— XOR with assignment
==
— Equals
!=
— Not equal
?:
- Ternary (ternary) conditional operator operator To me, as a beginner, most of them are clear, and those that are not clear can be googled. But Google did not answer me, what is the difference between logical AND (OR) and shorthand? What is the main difference (if any). In what cases can one or another operator be used? Thank you.
GO TO FULL VERSION