Skip to content

PRO TIP Block youtube.com at the DNS level — Pi-hole, NextDNS or your hosts file — but allow youtube-nocookie.com and i.ytimg.com. These tutorials keep playing; the rabbit hole does not.

Learning without distractions

Learn JavaScript setTimeout() in 6 minutes! ⏰

35.5K views on YouTube

00:00:00 introduction
00:00:30 setTimeout w/ callback
00:01:04 setTimeout w/ anonymous functions
00:01:25 setTimeout w/ arrow funcitons
00:01:43 clearTimeout()
00:02:32 start button
00:03:51 clear button
00:05:49 conclusion

// setTimeout() = function in JavaScript that allows you to schedule
// the execution of a function after an amount of time
// Times are approximate
// setTimeout(callback, delay);

function hello() {
window.alert(“Hello”);
}

setTimeout(hello, 3000);