As i said that, === this operator considers the data type of the variable and == this operator considers the value of the variable,
- == operator is know as type coercion operator and anytime if both values are same but not data type using this == type coercion will happen. On other hand if we use === operator this will check both data type and value. you should use === operator over == operator for comparison.
- Also if there is any difference between == and === then there is also difference between != and !==.
It is easy to guess that != operator only checks the value and !== operator will consider both data type and value of the variables.
You should use Strictly equality operator for comparison avoid using == operator this. Even if you need type coercion, Instead convert the type by yourself.