DEV Community

Discussion on: Developing our own cowin slot notifier in 30 mins

Collapse
 
venkateshwar24 profile image
Venkateshwar24

Hello,why the poll() method is not executing further to fetchDetails,if I opt to omit setInterval() ?

Collapse
 
sunil12738 profile image
Sunil Chaudhary

Hi,

setInterval repeatedly calls a function or executes a code snippet, with a fixed time delay between each call. Here, it is the one to call fetchSlots every 3 seconds. If that is removed, it means there is no function which is going to call fetchSlots again and again.

Hope it clarifies the doubt.