javascript timers Flashcards
what is this?
setTimeout(functionRef, delay)
It’s how you set a delay for as many milliseconds as you enter, and the function that you enter will execute after that time has passed
What is a “callback” function?
A function that you use as an argument in another function
Besides adding an event listener callback function to an element or the document, what is one way to delay the execution of a JavaScript function until some point in the future?
set timeout function
How can you set up a function to be called repeatedly without using a loop?
using the
setInterval( )
method
What is the default time delay if you omit the delay parameter from setTimeout() or setInterval()?
zero
What do setTimeout() and setInterval() return?
An interval id which is not zero