setInterval
function setInterval(
callback,
delay?, ...
args?): number;
Set a repeated timer that calls a function, with a fixed time delay between each call.
Parameters
| Parameter | Type | Description |
|---|---|---|
| (... | A function to be executed every |
|
| (Optional) The milliseconds that the timer should delay in between execution of the function, by default is |
... |
| (Optional) Additional arguments which are passed through to the function. |
Returns
number
The ID (integer) which identifies the timer created.
Throws
Throws TypeError if callback is not a function, or delay is neither a number or undefined.