Introduction to JavaScript
JavaScript is the programming language of the web — every browser can run it natively, which is why virtually every interactive website uses it. Unlike Python, which usually needs to be installed separately, JavaScript already runs wherever a browser does.
JavaScript also runs outside the browser, on servers, via Node.js — the same language on the frontend and backend, which is a big part of why it's so widely used.
What JavaScript is actually used for
- Web frontends — every interactive element on a webpage (dropdowns, form validation, live updates) is JavaScript
- Web backends — Node.js lets the same language power servers, APIs, and databases
- Mobile and desktop apps — frameworks like React Native and Electron build real apps from JavaScript
- Scripting and automation — build tools, command-line scripts, and browser extensions
A quick preview
Here's a single line of real JavaScript, executed for real on this page's own compiler — not a mockup:
That's the whole program. The next lesson breaks down exactly what's happening in that line, and has you write your own version.
Practice exercise
Print the text "Hello, JavaScript!" and then print the result of 2 ** 10.