Interactive websites
Menus, image sliders, form checks, maps and live search. Almost every site you visit runs some JavaScript.
Examples: Gmail, Google Maps, YouTube
Free Lesson
JavaScript is the programming language that makes web pages interactive. HTML builds the page, CSS styles it, and JavaScript makes it respond when you click, type or scroll, and it runs in every web browser with nothing to install.
Brendan Eich created JavaScript in 10 days in 1995 at Netscape. Today it also runs servers, apps and games. Switch a page layer off below, then run your first line.
Interactive demo
Think of a web page as a house. Turn each layer off to see what it was doing.
Mango, peach and a squeeze of lime.
All three layers on: structure, style and behavior working together.
Pick a line, press Run and watch the page change. The effect is prepared ahead of time, so no code runs on your device.
script.js
document.querySelector("h3").textContent = "Hello, JavaScript!";querySelector finds the heading on the page, and textContent swaps its words. No page reload needed.
This card is the page your script.js controls.
Six questions on what JavaScript is and what it does.
Real world
Menus, image sliders, form checks, maps and live search. Almost every site you visit runs some JavaScript.
Examples: Gmail, Google Maps, YouTube
Node.js runs JavaScript outside the browser, so the same language can power logins, APIs and databases.
Examples: Netflix, PayPal and LinkedIn back ends
React Native builds phone apps and Electron builds desktop apps, both written in JavaScript.
Examples: VS Code, Slack, Discord
Canvas and WebGL draw graphics right in the page, so games run with no download.
Examples: 2048, Wordle-style puzzles, Phaser games
Common mix-up
Different languages, similar names. Netscape renamed its new language from LiveScript to JavaScript in 1995 to ride Java's popularity. Java is compiled and mostly used for Android apps and large business systems. JavaScript runs in every browser and is the language of the web. As the saying goes: Java is to JavaScript as car is to carpet.
Get started
It is one of the easiest languages to start. You already have everything you need: a web browser. You see results instantly on a real page, which keeps practice fun. The tricky parts come later (asynchronous code, frameworks), and you can learn them one at a time.
Open your browser's developer tools (F12), try console.log, numbers, strings and variables with let and const.
Learn if and else, comparison operators, and for loops. Build a tiny number guessing game in the console.
Write your own functions, then use querySelector and addEventListener to change a real HTML page.
Build a to-do list, a tip calculator or a quiz page with HTML, CSS and JavaScript, and share it online.
Code Card turns your Claude Code, Codex, and OpenClaw sessions into a public developer profile with activity graphs, streaks, badges, and a shareable card, so you can track your coding progress. Start with npx code-card.
FAQ
JavaScript is the programming language that makes web pages interactive. HTML builds the page, CSS styles it, and JavaScript makes it respond when you click, type or scroll. It runs in every web browser.
JavaScript is used for interactive websites (menus, forms, maps), servers and APIs with Node.js, mobile apps with React Native, desktop apps with Electron, and browser games.
HTML is the structure of a page (headings, text, buttons), CSS is the style (colors, fonts, layout) and JavaScript is the behavior (what happens when you interact). Most web pages use all three together.
No. Java and JavaScript are different languages. JavaScript was renamed in 1995 to ride Java's popularity. Java is mostly used for Android and large business systems, JavaScript for the web.
JavaScript is one of the most beginner-friendly languages because you can run it in any browser with no setup and see results instantly. Most beginners build a small interactive page within a few weeks of practice.