Pergunta de entrevista da empresa EarnUp

Implement your own setInterval() function in JS. You must also provide a way to clear the interval.