tech/webdev magazine

November 10, 2020

Understanding Modules and Import and Export Statements in JavaScript

Tuesday, November 10, 2020 Teklinks

In the early days of the Web, websites consisted primarily of HTML and CSS. If any JavaScript loaded into a page at all, it was usually in the form of small snippets that provided effects and interactivity. As a result, JavaScript programs were often written entirely in one file and loaded into a script tag. A developer could break the JavaScript up into multiple files, but all variables and functions would still be added to the global scope.

Full article