0
Can someone please explain to me what's the differences between these and what and when they are used for?
1. == and === 2. != and !==
4 Respuestas
+ 2
Identical(===) and Not Identical(!==) compare both type and value, but == and != only compares the value. So if you compare an integer 10 with a string "10" === returns false but == returns true.
+ 1
x === y is "x equals y"
== is a bit more complicated. it's a logical process known as XOR. it finds out if two things are the same, usually used when we want to know if x is true and y is also true, or when x is false and y is also false. that's when we use [ if (x == y)]
! is the "not" wherever you put it
0
x+28.8 y++-23
0
what great average denomation +++45.23