0
can anyone elaborate the difference between != and !== with examples..
3 odpowiedzi
+ 2
!= means not equal, and !== means not equal or not at the same format. example:
2 != "2" this will return false because its same
2 !== "2" this is true because its not at the same format, the first is int and the second is string
+ 1
! = will only check the value, and if value does not match gives you the result as true.
Var data1 = 5;
Var data2 = 'u' ;
If(data1! =data2)
{
} this will be true, but when you do
If(data1! ==data2)
{
} this will give you compilation error as the data1 is interger but data2 is string.
0
the first one means " not equal " the second one means " not identical "