JavaScript tutorial
Make the page respond when someone clicks.
Variables, functions, the DOM, and events. The editor has a live page and a console. Try it Yourself opens /javascript/try.
52 chapters. The editor is /javascript/try.
Topics
Start at intro, or jump to the DOM, events, or projects.
Start
Intro → first script
Intro · Where To · Output · SyntaxVariables
Names you can reuse
let · const · OperatorsCore
Functions, objects, events
Functions · Objects · EventsData
Strings, numbers, lists
Strings · Arrays · MathFlow
Decisions and loops
If · For · WhileBrowser
Change the page itself
DOM · Events · StoragePractice
100+ copy-and-run snippets
console.log · DOM · ArraysProjects
Ten apps you can finish
Counter · Quiz · To-DoBootcamp
Question, hint, solution, Check
Labs · Hints · CheckWhat you get in this tutorial
- A page and a console. Logs go under the preview. Clicks can change the DOM.
- Its own editor. Lessons are under /javascript. The editor is /javascript/try.
- A chapter path. Read, change the example, press Next.
All chapters
Every chapter, in order.
- 01JS Intro
- 02JS Where To
- 03JS Output
- 04JS Statements
- 05JS Syntax
- 06JS Comments
- 07JS Variables
- 08JS Let
- 09JS Const
- 10JS Operators
- 11JS Arithmetic
- 12JS Assignment
- 13JS Data Types
- 14JS Functions
- 15JS Objects
- 16JS Events
- 17JS Strings
- 18String Methods
- 19Template Strings
- 20JS Numbers
- 21Number Methods
- 22JS Arrays
- 23Array Methods
- 24Array Iteration
- 25JS Dates
- 26JS Math
- 27JS Random
- 28JS Booleans
- 29JS Comparisons
- 30JS If Else
- 31JS Switch
- 32JS For
- 33JS While
- 34Break Continue
- 35JS Sets
- 36JS Maps
- 37JS Typeof
- 38Type Conversion
- 39JS Scope
- 40JS this
- 41Arrow Functions
- 42JS Errors
- 43JS Classes
- 44JS JSON
- 45JS Debugging
- 46JS DOM
- 47DOM Elements
- 48Event Listener
- 49JS Window
- 50JS Storage
- 51JS Fetch
- 52JS Examples