Very easy – yet somehow confusing for a lot of folks.
Check out the help files for setInterval. But basically the
setInterval handles the wait part. So it isn't part of the
function. Also setInterval really means "do this function
repeatedly at the specified interval." But you can use it once and
then clear the interval to achieve the effect you want.