Scripting the page.
WHAT IT IS
A programming language running in the browser, and increasingly on servers.
WHAT IT ADDS TO A PAGE
Response to user actions Changing content without reloading Fetching data Validation Anything interactive
WHAT IT SHOULD NOT BE RESPONSIBLE FOR
Content that could be delivered as markup Styling that could be done with stylesheets Essential function, without a fallback
WHY THAT LAST POINT
Scripts fail: blocked, slow, or erroring. A page depending entirely on them shows nothing when they do.
WHAT PROGRESSIVE ENHANCEMENT MEANS
The core works without scripts, and scripts improve it.
WHY THAT MATTERS
Reliability, accessibility, and performance on poor connections.
WHAT RUNS WHERE
In the browser, for interface behaviour On the server, where it is used for application logic
WHAT THE LANGUAGE HAS BECOME
Considerably more capable than it was, with modern features making it practical for substantial applications.
WHAT TO LEARN FIRST
Variables, types, functions, objects, arrays, and how the page is represented in code.