make a script wait 5 seconds when its called javascript code example
Example: How do you wait for 5 seconds in JavaScript?
timeout(ms) { //pass a time in milliseconds to this function
return new Promise(resolve => setTimeout(resolve, ms));
}
timeout(ms) { //pass a time in milliseconds to this function
return new Promise(resolve => setTimeout(resolve, ms));
}