Run
Online Code Editor
Example of using the sleep() in JavaScript
There is a sleep of 2000 milliseconds