The difference between the two functions is fairly trivial. setTimeout() executes the function only once, unless you call it again; and setInterval() continuously calls the function until clearInterval() is called. The only disadvantage to using setTimeout() when you really wanted the functionality of setInterval is that the time between each call will vary depending on how long it takes your code to execute (and sometimes you actually want that feature). There is some danger in using setInterval() and hoping your code is fast enough to call clearInterval() before the interval time passes. In such a case, the next call is queued and will execute your function any number of times depending on how many times the interval time passed while your code was running.