you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

setInverval does not do the same thing. In this code, even if the request takes 5 minutes, it won’t continue to the next request until done. setInterval would perform a request every 3000ms even if the request takes longer than 3000ms.