setTimeout Node JS
setTimeout(function () {
console.log("5 secondes");
}, 5000);
console.log("now");
adriendums
setTimeout(function () {
console.log("5 secondes");
}, 5000);
console.log("now");
setInterval(function () {
console.log("Every 5 secondes");
}, 5000);
console.log("now");
function myFunc(arg) {
console.log(`arg was => ${arg}`);
}
setTimeout(myFunc, 1500, 'funky');
await new Promise(resolve => setTimeout(resolve, 1000))