This Process will block the main thread, and you'll notice that the DOM does not change until after the function execution completes regardless of the code structure.
Nested Calls do not save you.
This Process will block the main thread when it runs, but it will update the DOM immediately since the dom repaint will occur before the setTimeout is run after the repaint.
This is here to show how the call tree works.
This Process will not block the main thread, as it's run in a separate thread in the workers.
Click this while one of the examples is running to see the DOM update or not, depending