What is the difference between == and === | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

What is the difference between == and ===

not able to differentiate

8th Nov 2016, 1:20 AM
Saksham Jain
Saksham Jain - avatar
2 Respostas
+ 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