Logical Operators Logical operators are used to combine logical expressions. The most common logical operators are:And: &&Or: ||Not: !The following code shows an example of how to use logical operators: var x = true; var y = false; console.log(x && y); // will be false console.log(x || y); // will be true console.log(!x); // will be false Run Code ADVERTISEMENT ADVERTISEMENT Previous Next