oparator not equel in js code example
Example 1: or operator in javascript
//The OR operator in Javascript is 2 verticals lines: ||
var a = true;
var b = false;
if(a || b) {
//one of them is true, code inside this block will be executed
}
Example 2: or operator js
//OR Operator
const x = 7;
const y = 4;
(x == 5 || y == 5); // false
(x == 7 || y == 0); // true
(x == 0 || y == 4); // true
(x == 7 || y == 4); // true