Using sleepTimeout in JavaScript
tldr: ALWAYS take a brief look at official developer documentation of functions.
I was trying to rush a release over weekend and I had requirement where I was to make repeated API calls to track progress of status of task. Without that any new user would be seeing a…