I want my java script to sleep or wait for some seconds before it executes rest of the lines. But I don't want to put rest of my code inside function like in this --> setTimeout(function() {---code---},3000) since my function is very big.
I want something like thread.sleep in Java, in Javascript.
Could someone help me on this as I'm new to Javascript.