4 ms·
If we're going to use electrical analogies, parseInt is like a wall outlet connected to a switch that will give you an electrical shock if you plug something in
by atmavatar 2y ago
If we're going to use electrical analogies, parseInt is like a wall outlet connected to a switch that will give you an electrical shock if you plug something in while the switch is on.
With some experience and/or foreknowledge of this behavior, you can avoid the shock, but the average person is going to assume the outlet works like any other electrical outlet and plug things in without thinking about the switch.
They'd still be correct to complain when this one outlet gives them a jolt from time to time.
And, in all likelihood, even people who know about the switch will absentmindedly get zapped occasionally.