Function instantInterval

  • Run a function immediately & repeat every x ms

    Parameters

    • fn: (() => any)

      Callback function

        • (): any
        • Returns any

    • interval: number

      Repeat in ms

    Returns Timeout

    Clear Interval ID