or operator js

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
}if(a <= 5){
   yourFunction();
}let a = true;

let b = !a;

console.log(b); //output: falseif (x === 5 || x === 8)
  console.log("x is eaqual to 5 OR 8")//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
//OR operator expressed as ||

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

if (condition == value || condition == otherValue) {
  return something;
}
Source

Also in JavaScript: