The language of the web
JavaScript
Runs in every browser and, with Node.js, on servers too. Event-driven, flexible and everywhere front-end work happens. This path has 19 lessons in reading order, from the basics to the ideas that come up in real code, with a runnable example in every lesson.
- lessons
- 19 lessons
- exercises
- 20 exercises
- interview questions
- 25 interview questions
- challenges
- 6 challenges
What JavaScript is used for
- Front-end web apps
- Node.js backends
- Browser extensions
- Tooling
How examples are checked
Every example and every exercise solution was run with Node.js 22 at build time; runs in your browser in an isolated Web Worker. The Run buttons execute the same code on your device.
Learn
The JavaScript learning path
Read in order: each lesson leans only on the ones before it. Every lesson ends with a small program to write and links to matching exercises.
Beginner
Beginner- 1JavaScript Syntax and Your First Program
- 2Variables in JavaScript: let, const and var
- 3JavaScript Data Types: Primitives, Objects and typeof
- 4JavaScript Operators: Arithmetic, Comparison and Logic
- 5Conditions in JavaScript: if, else if, else and switch
- 6Loops in JavaScript: for, while, for...of and for...in
- 7JavaScript Functions: Declarations, Arrows and Return Values
- 8JavaScript Arrays: Creating, Indexing and Changing Lists
- 9JavaScript Objects: Properties, Methods and Nesting
- 10JavaScript Strings: Methods, Template Literals and Slicing
Practice
Practise JavaScript
20 exercises across 8 topics, each checked by running your program against test cases. Start with these:
- Cafe bill totalEasy
Read prices and quantities, then print a JavaScript cafe bill total with exactly two decimal places.
BasicsNot started
- Cold-room alertEasy
Classify a sensor reading with JavaScript if, else if and exact boundary handling.
ConditionsNot started
- Dispatch code normalizerMedium
Normalize and deduplicate dispatch codes with mixed case and formatting hyphens.
StringsNot started
- First repeated ticketMedium
Find the first ticket ID whose second appearance occurs earliest in a scan log.
ArraysNot started
More
Go further
JavaScript interview questions
25 questions with answers that explain the reasoning: concepts, output prediction, debugging, coding and scenarios.
Coding challenges in JavaScript
6 algorithmic problems with starter code and tests.
JavaScript playground
Write and run JavaScript in your browser with example snippets to start from.