I came across a defect in my software caused by: 0 == "v2"
is true
Firstly that seems crazy but I'm sure theres some weird conversion going on. I need a way to compare two values without specific types, i.e.:
0 == "v2"
is false
0 == "0"
is true
But the ===
operator will not work in the second case. Is there a reliable way to do this?