Glossary term
What is setTimeout (setTimeout(callback, ms))?
setTimeout stands for setTimeout(callback, ms).
Ask the browser to run a callback after at least ms milliseconds. “At least”, because the callback still has to wait for an empty call stack.
Learn it properly · JavaScript CoreLesson 11: setTimeout and Closures: The Interview ClassicOne loop, one setTimeout, one wrong answer almost everyone gives the first time. This lesson is dedicated entirely to the single most-asked closures question in JavaScript interviews — and four different, genuinely correct ways to fix it.