Using setTimeout over setInterval
What if you need a function that makes an ajax request repeatedly after a specific time interval? What would you do? Writing a setInterval(callback, delay) would seem to be the ideal way, right? But there’s a problem.
function serverFetch() {
setTi...
adityaprabhat.hashnode.dev1 min read