3 ms·
But === is the other equals, not the equals. Also, that only helps in boolean contexts, not with any function calls.
by lucian1900 14y ago
But === is the other equals, not the equals.
Also, that only helps in boolean contexts, not with any function calls.
- chris_wot 14y agoAlso, that only helps in boolean contexts, not with any function calls. Could you clarify?
- lucian1900 14y ago'1' === 1 is false, because === is strict. But there's no strict equivalent of + or -, so '1' + 1 is '11', but '1' - 1 is 0. The same holds for parseInt('Ambulance', 16) and parseInt('A', 16), which are both 10.