You should learn Java script before writing code as they are many subtilities like this one that one should be aware. Otherwise, you might write buggy code not understanding why.
===
should be used instead when you want to ensure that you have same type on both side.
On the following site, there is a table that show the result of some comparison:
Equality comparisons and sameness - JavaScript | MDN[
^]
It clearly show that
"" == 0
is true.