I have the following scenario:
setTimeout(\"alert(\'this alert is timedout and should be the first\');\", 5000); alert(\"this should be the second one\"); >
No, as there is no delay function in Javascript, there is no way to do this other than busy waiting (which would lock up the browser).