== operation performs type type coercion and should almost always be avoided. Instead you should use the
=== to do a true boolean comparison.
For example, because of type coercion.,
1 == true is true, but
1 === true is false. The
== operator often hides type errors.
'' == '0' // false 0 == '' // true 0 == '0' // true false == 'false' // false false == '0' // true false == undefined // false false == null // false null == undefined // true ' \t\r\n ' == 0 // true