[What is the JavaScript version of sleep()?]
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
The Development Blog of Tim Graupmann
[What is the JavaScript version of sleep()?]
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}