I have read the relevant pages on w3schools and other similar questions here but cannot seem to understand what\'s wrong about the following bit :
var myfunc
while waiting for setTimeout :
while
setTimeout
(async () => { var i = 0; while (await new Promise(resolve => setTimeout(() => resolve(i++), 1000)) < 100) { console.log("I get printed 100 times every second"); } })();