logical comparison in javascript 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: js logical operators

Javascript Logical Operators
&& Logical and
|| Logical or
! Logical not

Example 3: || in js

const a = 3;
const b = -2;

console.log(a > 0 || b > 0);
// expected output: true

Example 4: js comparison operators

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

Tags:

Misc Example