setTimeout allows us to run a function once after the interval of time. setInterval allows us to run a function repeatedly, starting after the interval of time, then repeating continuously at that interval.
If the first argument is a string, then JavaScript creates a function from it.
The first line “puts the call into calendar after 0ms”. But the scheduler will only “check the calendar” after the current script is complete,
The HTML Living Standard says: “after five nested timers, the interval is forced to be at least 4 milliseconds.”.
few times with zero-delay, and afterwards with 4+ ms delay.
Glasp is a social web highlighter that people can highlight and organize quotes and thoughts from the web, and access other like-minded people’s learning.