JavaScript Modules
Splitting Code into Files with import and export
Real-world programs are too large to fit in one file. Modules let you split code into separate, self-contained files that can share functionality with each other. Work through the pages below in order.