Using setInterval()The setInterval() repeatedly changes the document background color every three seconds.
The setInterval() repeatedly changes the document background color every three seconds.