Logical Operators

In JavaScript, for each of the three logical operations (AND, OR and NOT) there is a corresponding operator: &&, || and !. In general, there are rules regarding the order of the operations and, in this case, ! (negation) is applied first, and then && (conjunction) and then || (disjunction).

The order of operations between the operators can be overcome by using an operator with higher precedence: ( ), named the 'Grouping operator' or simply said 'parentheses'.


Backlinks