What is the best practise for php sleep function in javascript?
<p>For example in php we could put in a loop a sleep function for 5 min where could pause the execution than loop back where we could get new fetch result from database or other instances how can this be done in javascript as the only way is to set timeout and call the same function inside it,
Thank you.</p>