js logical operators

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
}Javascript Comparison Operators
== Equal to
=== Equal value and equal type
!= Not equal
!== Not equal value or not equal type
> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to
? Ternary operator
Javascript Logical Operators
&& Logical and
|| Logical or
! Logical not
var hungry=true;
var slow=true;
var anxious=true;

//&& means and
if(hungry && slow && anxious){ 
	var cause="weed";
}var x = 5;

// === 	equal value and equal type
// e.g. 1. 
x === 5 returns true

// e.g. 2.
x === "5" returns false

// !== not equal value or not equal type
// e.g. 1.
x !== 5 returns false

// e.g. 2.
x !== "5" returns true

// e.g. 3.
x !== 8 returns truelet a = 1;
let b = -1;

if (a > 0 & b > 0){
	console.log("and");
} else if (a > 0 || b > 0){
	console.log("or");
} 
Source

Also in JavaScript: