0
!== operator in js. How to rightly use?
!== operator in js. How to rightly use?
1 Réponse
+ 1
You can use it when you need both values to be equal and of the same type. This is because the inequality operator ( != ) Does not verify the type of both values to be compared.
Example:
The expression 3! = '3' gives a false result. Since both values are equal, although they are of different types.
The expression 3! == '3' gives true as result. Since both values are equal, but are of different types
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators