it is sometimes useful to do something perodically, or after a wait, we can use the 'setTimeout' and 'setInterval' functions to do exactly that. setTimeout waits the stated time and runs once. setInterval runs every x number of milliseconds. the first parameter of those functions is the function to run when the time elapses, the second parameter is the amount of delay in milliseconds.