How to call a function 10 times like
for(x=0; x<10; x++) callfunction();
but with 1 sec between each call?
const functionCounterTimer = (callCount) => { if (callCount < 10) { setTimeout(() => { ++callCount console.log("Function Call ", callCount); functionCounterTimer(callCount); }, 1000); } } functionCounterTimer(0);
The above was my approach to a similar question.