|
|
|
|
|
by swatcoder
615 days ago
|
|
That's just terrible input validation and has nothing to do with setTimeout. If your code would misbehave outside a certain range of values and you're input might span a larger range, you should be checking your input against the range that's valid. Your sample code simply doesn't do that, and that's why there's a bug. That the bug happens to involve a timer is irrelevant. |
|