Waiting with setTimeout
Pause between numbers.
Wait For It... ⏱️
A real countdown waits one second between numbers! We use setTimeout to make the computer wait. ⏱️
console.log('Let us learn to wait! ⏱️')What Is setTimeout? ⏰
setTimeout runs some code AFTER waiting a number of milliseconds. 1000 ms = 1 second! ⏰
setTimeout(function () {
console.log('One second passed! ⏰')
}, 1000)All lessons in this course
- Counting Down to Zero
- Waiting with setTimeout
- Blast Off!
- Your Own Timer