In JavaScript is != same as !==

They are subtly not the same.

!= checks the value
!== checks the value and type

'1' != 1   // false (these two are the same)
'1' !== 1 // true (these two are **not** the same).

In the previous example. The first half of the expression is a string, the second half is an integer.

Leave a Comment