The setInterval() method will wait a specified number of milliseconds, and then execute a specified function, and it will continue to execute the function, once at every given time-interval.
9.
What is the method used to stop an execution of a method?
The clearInterval() method is used to stop further executions of the function specified in the setInterval() method) The clearTimeout() method is used to stop the execution of the function specified in the setTimeout() method.
Hoisting is JavaScript’s default behavior of moving declarations to the top. In JavaScript, a variable can be declared after it has been used) In other words; a variable can be used before it has been declared.