4 ms·
Arguably 48 == "48" should be true. If this doesn't work for you, stick to ===.
by chx 3y ago
Arguably 48 == "48" should be true. If this doesn't work for you, stick to ===.
- xigoi 3y agoThank you, I'll stick to languages where you can't just compare numbers and strings without an explicit conversion. Also, should 48 == "48.0" be true? How about "048", "48.", "0x30", " 48 ", "48foo", "3*16", "XLVIII", "forty-eight"?