not equal 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: javascript and operator
//AND Operator expressed as &&
const x = 7;
const y = 4;
(x == 7 && y == 5); // false
(x == 3 && y == 4); // false
(x == 7 && y == 4); // true
if (condition == value && condition == otherValue) {
return something;
}
Example 4: 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 5: javascript does not equal
!= not equal
!== not equal value OR type
Example 6: not equal to sign in js
let a=12
if(a!=5){
console.log(true)
}
since a is not equal to 5, it will print true