To understand that, we first need to understand synchronous and asynchronous behaviour Synchronous: Javascript executes code line by line, and it waits for one line to finish before moving to the next ...
The rest of your script keeps running. I practiced with setTimeout. This utility runs code after a set delay. I noticed that code written after a timeout often runs first. This proves JavaScript does ...