+ 1
JavaScript difference between === and ==
4 odpowiedzi
+ 8
== uses type correction while checking ( 0 == "0" gives true) while === doesn't.
Pro tip - use ===.
And this is something you might find funny & informative (about how == handles things, coercing) ~
https://www.freecodecamp.org/news/explaining-the-best-javascript-meme-i-have-ever-seen/
+ 1
https://code.sololearn.com/W2zCXFE23QGi
+ 1
== : It compare value not its type but
=== : It compare value with its type
0
== means equal to
whttps://code.sololearn.com/W2zCXFE23QGihile === means equal to and same type or identical.