Inequality

suggest change

Operator != is the inverse of the == operator.

Will return true if the operands aren’t equal.

The javascript engine will try and convert both operands to matching types if they aren’t of the same type. Note: if the two operands have different internal references in memory, then false will be returned.

Sample:

1 != '1'     // false
1 != 2       // true

In the sample above, 1 != '1' is false because, a primitive number type is being compared to a char value. Therefore, the Javascript engine doesn’t care about the datatype of the R.H.S value.

Operator: !== is the inverse of the === operator. Will return true if the operands are not equal or if their types do not match.

Example:

1 !== '1'    // true
1 !== 2      // true
1 !== 1      // false

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Comparison operations:
* Inequality

Table Of Contents
11 Arrays
12 Objects
14 Classes
16 Map
17 Set
22 Comparison operations
24 Loops
27 Date
29 Scope
30 AJAX
35 Cookies
41 JSON
44 Fetch
45 Modules
46 Screen
64 Console
68 Symbols
73 Modals
76 Events
86 Proxy
89 WeakMap
90 WeakSet
102 Tilde