Javascript – Infinity loop with async function
I need to fetch data from server in infinity loop. This code generates a reursion, is this correct way? My code (code updated): function pause(delay) { return new Promise(r => setTimeout(r, delay)) } async function fetchData( url, tries = 5…