2 ms·
'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('Ambu
by 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.