I was going through the WHATWG specs for async
and defer
attributes for the <script>
tag, when I saw this statement:
Classic scripts may specify
defer
orasync
; module scripts may specifyasync
.
I went through the WHATWG definitions for classic and module scripts, but didn't really get much clarity. Could someone explain to me like I'm 5, the differences between classic and module scripts in Javascript?
Here are the differences I have noted from various articles. If you want more details, read a complete article on the web: