javascript settimeout
setTimeout(function(){
alert("Sup!");
}, 2000);//wait 2 seconds
javascript settimeout
setTimeout(function(){
alert("Sup!");
}, 2000);//wait 2 seconds
settimeout es6
// set
var timerid = setTimeout(() => {
console.log('hi :D ');
}, 1000);
// clear
clearTimeout(timerid);
// Syntax
// set
myVar = setTimeout("javascript function", milliseconds);
// clear
clearTimeout(id_of_settimeout);
/ Rnadco.ir /
settimeout arrow function javascript
doWork(callback) {
setTimeout(() => callback(this.name), 15);
}
settimeout function es6
if (timerid) {
clearTimeout(timerid);
}
timerid = setTimeout(() => {
this.reqMaq(obj['fkmaqid'])
}, 2000);
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