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.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hello,why the poll() method is not executing further to fetchDetails,if I opt to omit setInterval() ?
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.