Double Equals (==)
Double equals(==) are known as the abstract equality comparison operator. That means it will compare the values between a number and a string and if those values match, it will show as "True".
Here, 10 is a number and “10” is a string. The double equals(==) are comparing the values between those two and as the value is 10 the result is displaying as “true”.
Triple Equals (===)
Triple equals (===) are known as the strict equality comparison operator. That means it will compare the values as well as data types between a number and a string and if and only if the data types, as well as values, are same it will show as “true”, otherwise the result will be displayed as "false".
Here, 10 is a number and “10” is a string. The triple equals(==) are comparing the values as well as the data types between those two, and though the value is same, the data type isn't. So the result is being displayed as false.
Here "10" and "10" are both strings and their value is also same, so the result is coming as "true".
In a nutshell, Double equals(==) compare the value and Tripe equals(===) compare the value as well as the data types.
Personally, I would always suggest you to use the strict comparison operator i.e. Triple Equals(===).
Trust me, Triple equals help you see the code formation more clearly.
You are surfing this article at webtutsplus.com