AdPushup Interview Question

How will you implement setInterval function by just using setTimeout?