+ 3
What is difference between == & === operators?
3 odpowiedzi
+ 9
5 == 5.0 (This is true because 5 is equal to 5.0)
5 === 5.0 (This is false because although 5 is equal to 5.0, they are not the same [5 is an integer while 5.0 is a float])
+ 3
== looks if both values are equal.
=== looks if both operands are equal in value AND type.
+ 1
== checks only values of variables whereas === checks data type of variables as well as their values 👍