Loading Modules in the Browser
<script type="module" src="myFile.js"></script>
defer attribute is automatically implied.
defer allows the browser to download and parse the script in parallel with HTML parsing. The script is executed after the document has been parsed, but before
Scripts will execute in the order they appear in the document.
async attribute like this:
<script type="module" src="myFile.js" async></script>
async attribute causes the script to execute as soon as it’s been downloaded. Interrupting HTML parsing if necessary.
This disables ‘in-order’ execution of the script. It will execute as soon as possible.