Execute a function every so often. Similar to setTimeout.

This function is valid in v2.0.0 to v2.12.0. This function has been downloaded 14 times.


{Function} fn
Function to be executed every so often.
{number} msDelay
Number of milliseconds between calls to fn.
{Array=} opt_args Optional, Default:[]
Arguments to be passed to fn every time it is called.
{boolean=} opt_immediate Optional, Default:false
Specifies whether or not an immediate call should occur.


The timeoutID associated with the ongoing process of running this function. To stop calling fn you can use clearInterval(timeoutID).

Required Function

This function requires the following function which is included automatically:

  • slice()
    Slice does not modify the original array, but instead returns a shallow copy of elements from the original array.