Implementation of setInterval Using setTimeout

# Introduction In this challenge, we will implement the functionality of `setInterval` using `setTimeout`. The objective is to encapsulate a `myInterval` function that takes a callback function (`fn`) and a delay time (`delay`) as parameters. The `myInterval` function will execute the `fn` function repeatedly at the specified intervals, and it will return a termination function that can be called to stop the timer. The challenge requires us to think about how to utilize `setTimeout` and `clearTimeout` to achieve this functionality.

|60 : 00

Click the virtual machine below to start practicing