Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Using a Repeat Timer with setInterval2:27 with Andrew Chalkley
In this video we'll use a repeat timer in the form of the `setInterval` function to modify the display of a clock.
callback is a function and
delay is the number of milliseconds between each invocation.
Canceling a Timeout
To cancel a interval at any time assign the interval to a variable and call the
const intervalID = clearInterval(callback, delay); //Clears the interval immediately clearInterval(intervalID);
You need to sign up for Treehouse in order to download course files.Sign up