I have the following scenario:
setTimeout(\"alert(\'this alert is timedout and should be the first\');\", 5000); alert(\"this should be the second one\"); >
setTimeout(function() { yourCode(); // alert('this alert is timedout and should be the first'); otherCode(); // alert("this should be the second one"); }, 5000);