3.2 Logical Operators
What Are Logical Operators?
Logical operators are used to combine two conditionals. JavaScript includes the following logical operators.
Examples
let a = 5, b = 10; (a != b) && (a < b); // returns true (a > b) || (a == b); // returns false (a < b) || (a == b); // returns true !(a < b); // returns false !(a > b); // returns true
Previous Section
3.1 Relational OperatorsNext Section
3.3 If, Else, Else ifCopyright © 2021 Code 4 Tomorrow. All rights reserved.
The code in this course is licensed under the MIT License.
If you would like to use content from any of our courses, you must obtain our explicit written permission and provide credit. Please contact classes@code4tomorrow.org for inquiries.