Definition
JavaScript adds behaviour such as menus, form validation, dynamic content and interactive tools. Every modern browser runs it, which makes it the most widely used web programming language.
Because scripts run on the visitor's device, large or poorly written scripts slow pages down. Developers reduce this with code splitting, lazy loading and careful dependency choices.
Use JavaScript to enhance a page, while keeping core content usable when scripts fail to load.