Is it bad practice to pass a string to settimeout? If yes, why? [duplicate]

Yes, it is.

The string must be eval‘d, which is evil (and very slow).
It also prevents you from using local variables in the callback.

Leave a Comment