+ 3

What is difference between == & === operators?

15th Jun 2017, 9:04 AM
MILIND JAIN
MILIND JAIN - avatar
3 ответов
+ 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])
15th Jun 2017, 10:40 AM
Leigh E. O.
Leigh E. O. - avatar
+ 3
== looks if both values are equal. === looks if both operands are equal in value AND type.
15th Jun 2017, 9:49 AM
Mario L.
Mario L. - avatar
+ 1
== checks only values of variables whereas === checks data type of variables as well as their values 👍
18th Jun 2017, 6:06 AM
Master Gaurav