-
setTimeOut()
is a built-in function that can tell the JavaScript program to wait.
const print = () =>{console.log('delay printing this please')};
setTimeout((print),1000);
console.log('I come first');
console.log('I come second');
/*output: I come first
I come second
delay printing this please. */
Top comments (0)