+ 1

What is the difference between == and ===

not able to differentiate

8th Nov 2016, 1:20 AM
Saksham Jain
Saksham Jain - avatar
2 odpowiedzi
+ 6
== means equal value. But === means equal value and equal type.
8th Nov 2016, 2:02 AM
Alireza M
Alireza M - avatar
+ 3
One of their differences is that == just check if the values are the same but the === check if their have the same data type too. Example If(1 == '1') // this is true If(1 === '1') // this is false
8th Nov 2016, 2:03 AM
Narciso Nuñez Arias
Narciso Nuñez Arias - avatar