wait for time javascript
//code before the pause
setTimeout(function(){
//do what you need here
}, 2000);
wait for time javascript
//code before the pause
setTimeout(function(){
//do what you need here
}, 2000);
wait javascript
wait(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
pauze js
setTimeout(() => { console.log("2000 milliseconds later!"); }, 2000);
wait until a function finishes javascript
function firstFunction(_callback){
// do some asynchronous work
// and when the asynchronous stuff is complete
_callback();
}
function secondFunction(){
// call first function and pass in a callback function which
// first function runs when it has completed
firstFunction(function() {
console.log('huzzah, I\'m done!');
});
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us