1var delayInMilliseconds = 1000; //1 second
2
3setTimeout(function() {
4 //your code to be executed after 1 second
5}, delayInMilliseconds);
6
1setTimeout(function(){
2 //code goes here
3}, 2000); //Time before execution
1console.log("Hello");
2setTimeout(() => { console.log("World!"); }, 2000);
3console.log("Goodbye!");
4