Now the danger of this is that Asynchronous feels like you just sent something to the background to happen later on another thread and won’t interfere with anything you want to do. That is not the case. At least within the browser anyway.
This isn’t a problem. I don’t mind that it works that way, but you have to be aware that it works this way. So if you have an async function that goes into an endless loop (I don’t recommend this), then it will block everything on your page. Here is a simple test page:
You will see that you can hit the “add” button to add an ‘a’ to the screen. But when you hit the “block” button, you will no longer be able to hid the “add” button. At all. The browser is too busy stuck in a loop.
Obviously, you would never put an endless loop in there on purpose, but if you have some asynchronous task that is going to take a long time to execute, then this is something you should know about. Asynchronous is not the same as multi-threaded, so you have to be careful not to block your interface, or other tasks that may need to execute.