So basically, I want to have the program return true when an equality test is put with 0 and an empty string (“”). Then, I could use the following without any error:
0 == ""; // true
But I don’t want to match:
0 == null
0 == undefined
"" == null
"" == undefined
I want them all to return false. How is this possible? I don’t think there’s an operator for this, so is there a way I can change their values to make this work somehow?
You can look at jsfiddle example.