3 ms·
How could === defend you in this case? `"100+" != 100` already. If you do a typeof before further processing the value then you'll know how to treat it, and ad
by jessedhillon 12y ago
How could === defend you in this case? `"100+" != 100` already.
If you do a typeof before further processing the value then you'll know how to treat it, and additionally someone who comes after you will realize that the value could be a number or a string.
- _ZeD_ 12y agoyes, but ``"100+" > 100`` is ``false``
- jessedhillon 12y agoSo... you'd have to parseInt anyway?