and operator code example
Example 1: js greater than or equal to
>= // greater than or equal
<= // less than or equal
> // greater than
< // less than
== // equals
=== // strictly equals
!= // not equals
!== // stricly not equals
Example 2: && javascript
// " && " in Javascript is the operator for AND.
Example 3: logical operators javascript
// There are 3 Javascript Logical Operators
// || (OR)
// && (AND)
// ! (NOT)
if (a || b) {
console.log("I will run if either a or b are true");
}
if (a && b) {
console.log("I will run, if and only if a and b are both true");
}
if (!a) {
console.log("I will only run if a is false");
}
if (a) {
console.log("I will only run if a is true");
}