
Learn JavaScript
JavaScript makes websites come alive. Buttons that respond, menus that open, forms that validate โ all JavaScript. It is the only language that runs natively in every browser on the planet.
JavaScript at a Glance
Curly braces, semicolons, and lightning-fast logic. Once you get it, it clicks.
const name = "Alice";
let score = 95;
const isPassing = score >= 50;
console.log("Name:", name);
console.log("Score:", score);
console.log(`${name} is passing: ${isPassing}`);โถ Console
Name: Alice Score: 95 Alice is passing: true
const double = (n) => n * 2;
const numbers = [1, 2, 3, 4, 5];
const doubled = numbers.map(double);
console.log(doubled);
console.log("Sum:", numbers.reduce((a, b) => a + b, 0));โถ Console
[2, 4, 6, 8, 10] Sum: 15
const student = {
name: "Bob",
grade: "A",
score: 91,
};
console.log(student.name);
console.log(`${student.name}: ${student.grade}`);
student.city = "Durban";
console.log(Object.keys(student));โถ Console
Bob Bob: A ["name", "grade", "score", "city"]
What You'll Learn
Six beginner-friendly modules โ from your first variable to making pages interactive.
Variables & Data Types
- let, const, var
- Strings, numbers, booleans
- console.log()
- Template literals
Operators & Conditions
- Maths operators
- if / else / else if
- === vs ==
- Ternary operator
Loops
- for loops
- while loops
- for...of
- break & continue
Functions
- function keyword
- Arrow functions
- Parameters & return
- Scope
Arrays & Objects
- Creating arrays
- push, pop, map, filter
- Objects (key-value)
- Destructuring
DOM & Events
- querySelector
- Changing text & style
- addEventListener
- Click & input events

JavaScript powers the full web stack
Once you know JavaScript, you can build React apps, Node.js servers, React Native mobile apps, and TypeScript projects. One language, infinite possibilities.
Frequently Asked Questions
Do I need HTML and CSS before JavaScript?
For the core language concepts (variables, loops, functions) โ no. But to make web pages interactive with JavaScript, you should know basic HTML first so you understand what elements you are working with.
Is JavaScript the same as Java?
No โ they are completely different languages. JavaScript was named after Java for marketing reasons in the 1990s, but they have nothing in common. JavaScript runs in browsers; Java is a completely separate compiled language.
What can I build with JavaScript?
Interactive websites, web apps (React, Vue), mobile apps (React Native), desktop apps (Electron), servers (Node.js), games, browser extensions, and more. It is truly everywhere.
What should I learn after JavaScript basics?
React is the most popular next step for building modern web apps. You can also explore Node.js for backend development, or TypeScript which adds type safety to JavaScript.
Ready to make the web interactive?
Free. No signup. No downloads. Just start.
Start Learning JavaScriptNo account required ยท Always free
The Story of JavaScript
Real history, real companies, and an honest look at where JavaScriptshines and where it doesn't โ not just a feature list.
Where it came from
Brendan Eich wrote the first version of JavaScript in just 10 days in 1995 while working at Netscape. It was originally intended as a small scripting glue language for web pages โ nobody involved expected it would become, three decades later, the only programming language that runs natively in every web browser on Earth.
How itโs actually used today
JavaScript runs the interactive layer of practically the entire web โ form validation, dynamic content, single-page apps like Gmail and Google Maps, and increasingly the back end too via Node.js (Netflix, PayPal and LinkedIn all run JavaScript on their servers). Desktop apps like VS Code and Slack are built with it via Electron, and it's the language behind most mobile apps built with React Native.
Strengths & trade-offs
Its biggest strength โ being loosely typed and forgiving โ is also its most criticised weakness, since mistakes that other languages catch at compile time can slip through until runtime. TypeScript exists largely to patch this. JavaScript's asynchronous model (promises, async/await) is powerful for I/O-heavy work but takes real practice to use correctly.
What to learn next
TypeScript is the most common next step for anyone writing JavaScript professionally, since it catches an entire category of bugs before your code ever runs. From there, React (front end) or Node.js (back end) are the two main directions depending on what you want to build.