JavaScript uses a single threaded run loop to execute your code; the moment your code returns it can schedule things like event handling, delayed code execution, AJAX responses, etc.
However, the code in Function1
never ends, so the JavaScript engine never gets a chance to schedule the execution of Function2
and thus "nothing happens".