JavaScript if not equal (!==) operator | Example code

JavaScript if not means simply if the value of two operands are not equal it returns true. You have to use not equal in if/else statement.

How to representation not equal in JS?

Here is symbol representation of not equal !=.


  • ! (negation operator) as “not”,
  • || (boolean-or operator) as “or”

Example of JavaScript if not equal

Example of a basic way of using Not equal to the operator in JavaScript, if the condition true then the alert box will pop with an actual vale of value1.

JavaScript if not equal

Do comment if you have any doubts and suggestions on tutorial.

Note: All JS Examples codes are tested on the Firefox browser and the Chrome browser.
OS: Windows 10
Code: HTML 5 Version

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.