What you will learn
This course teaches the ideas found in every programming language, using JavaScript. The first lessons run in a console, where you can see exactly what your code prints. The last lessons connect JavaScript to a web page.
- Values and variables: numbers, text, true and false, and names to store them under.
- Decisions: run different code depending on a condition.
- Loops: repeat work without repeating code.
- Functions: package code into reusable pieces.
- Arrays and objects: keep lists and structured data.
- The page: change what is on screen and respond to clicks.
Before you start
You need no programming experience. For the last three lessons it helps to know a little HTML, which you can pick up in HTML Basics.
How the lessons work
Write your code in the editor and press Run (or Ctrl+Enter) to see what it prints. Errors show with their line number, and the line is highlighted in the editor. Check My Code runs your program and tests the result, including calling the functions you wrote with different inputs.
Frequently asked questions
Is this JavaScript course free?
Yes. Every lesson is free, with no account and no limits.
Do I need to know HTML or CSS first?
Not for most of the course. The first eleven lessons are pure programming and run in a console. The last three work with a web page, where knowing basic HTML helps.
Where does my code run?
In your own browser, inside a sandbox that is separated from the rest of the site. Nothing you type is sent to a server.
What happens if I write a loop that never ends?
The editor stops code that runs for too long and tells you, so an endless loop cannot freeze the page.
Is JavaScript the same as Java?
No. They are two different languages with similar names. JavaScript is the one that runs in web browsers.
Do I get a certificate?
Yes. Finish every lesson to unlock a certificate of completion with your name on it. It is a personal record, not an accredited qualification.