# Several Scripts, One Page

Plain scripts run top to bottom and share one global space, so the last definition of a name wins; defer and module scripts run after the page is built, and onclick code runs only on a click.

![Several Scripts, One Page cheat sheet](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/f9ddb2865e474104ba807ddbe434825b.webp)

- Category: JavaScript
- Level: Apprentice
- Tags: Global Scope, Global Variable (javascript), Inline Event Handler, JavaScript, Script (javascript)
- Author: Gregor Dzierzon
- Updated: November 25, 2026

Source: https://www.ask-codey.com/cheat-sheets/javascript-first-programs-several-scripts-cheat-sheet
