not equal to operator in javascript code example
Example 1: js logical operators
Javascript Logical Operators
&& Logical and
|| Logical or
! Logical not
Example 2: 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 3: javascript does not equal
!= not equal
!== not equal value OR type
Example 4: != javascript
// " != " in Javasacript means : not equal.
Example 5: 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
Example 6: javascript not equal
0 !== "0"
0 !== 0