while(true){ window.setTimeout(function() { myMethod() }, 15000); } function myMethod() { alert(\"repeat\
With async/await, if you want to run an infinite loop of a function being ran every 3 seconds you can do this:
const wait = ms => new Promise(resolve => setTimeout(resolve, ms)); (async (delay) => { while (true) { await wait(delay); myFunc(); } }(3000); // 3 seconds