async attribute specifies that the script will be executed asynchronously as soon as it is available. And It is a boolean attribute.
asyncattribute is only for external scripts usage and it can be used only if the src attribute is present.
You can use the
async attribute with
<script src="my_main.js" async></script>