What is JavaScript?
Also called: JS
The short answer
JavaScript is the programming language of the web: it runs in every browser and makes pages interactive, from menus and forms to games and 3D.
JavaScript, explained
HTML is the structure, CSS the look, JavaScript the behaviour. It responds to clicks, fetches data without reloading, animates and powers whole applications.
It is also the most common cause of slow pages. The fastest sites send as little JavaScript as the experience needs and load the rest after the page is visible.
Questions people ask about JavaScript
What is JavaScript?
JavaScript is the programming language of the web: it runs in every browser and makes pages interactive, from menus and forms to games and 3D.
Is JavaScript the same as Java?
No. They are unrelated languages that share part of a name for historical marketing reasons.
Related terms
TypeScript is JavaScript with types: it checks code before it runs, catching mistakes like passing the wrong data to a function, then compiles to plain JavaScript.
ReactReact is a JavaScript library for building user interfaces from reusable components that update automatically when their data changes.
DOMThe DOM is the browser's live, tree-shaped model of a web page; JavaScript reads and changes the DOM to update what visitors see.
Code splittingCode splitting breaks a site's JavaScript into smaller chunks so each page downloads only the code it needs, loading the rest on demand.
Part of the Web Encyclopedia by Apex Flow Digital. Definitions are general knowledge, kept current, with no invented statistics.