Module script
noun
say it: “MOJ-ool SKRIPT” /ˈmɒdʒuːl skrɪpt/
A script tag with type="module", which lets a web page's JavaScript use import and export and keeps its variables out of the global scope.
What is Module script?
Module script — A script processed as a JavaScript module with imports, strict mode, and module scoping.
<script type="module" src="app.js"></script>
In a sentence
- “app.js is a module script, so it can import the cart code from cart.js.”
- “Once I made the page's script a module script, the browser stopped saying Cannot use import statement outside a module.”
Level: Journeyman · More JavaScript terms at this level
Updated