function sleep(interval) {
return new Promise(resolve =>
setTimeout(() => resolve(interval), 1000)
);
}
async function stepPrint(n) {for (let i = 0; i <= n; i++) {console.log(i);
await sleep(i * 10000);
}
}
stepPrint(5);