Answers for "!= vs !== javascript"

4

!= vs !== javascript

(0 ==  '0') // true
(0 === '0') // false

('' ==  0 ) // true, the string will implicitly be converted to an integer
('' === 0 ) // false, no implicit cast is being made
Posted by: Guest on December-27-2020
0

== vs === javascript

== Equal to (1 == 1, 1 == "1") // equal in value ("1" is a string)
=== Equal value and equal type (1 === 1 but, 1 !== "1" // not equal type
Posted by: Guest on February-24-2021

Code answers related to "!= vs !== javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language