number setTimeout(function callback, number delay, any rest)

Set a timer. When the set time is reached, the registered callback function is executed

Parameter

function callback

Callback function

number delay

Delay time (in milliseconds). The function call will happen after this delay.

any rest

Additional parameters such as param1, param2, ..., paramN, which are passed to the callback function as parameters.

Return

number

Timer number. This value can be passed to clearTimeout to cancel the timing.