JavaScript Tutorial: Getting Started
Write your first JavaScript program. No setup, no config — just code and results.
The most popular language on Earth
JavaScript runs in every browser, every website, every front-end framework, and on servers via Node.js. It is the one language you absolutely cannot escape as a developer — so you might as well love it.
The good news: the basics are approachable and the feedback is instant. Ten steps and you will be writing real code.
What you'll learn in this JavaScript getting started tutorial
This interactive JavaScript tutorial has 10 hands-on exercises. Estimated time: 15 minutes.
- Welcome to JavaScript — You just picked the most widely used programming language in the world.
- Make it say your name — Change the message to greet yourself.
- Print multiple things — Each `console.log()` prints on its own line. Run as many as you want — JavaScript goes top to bottom, one at a time.
- The semicolon situation — JavaScript semicolons are optional — the language has Automatic Semicolon Insertion (ASI) that adds them for you.
- Comments — notes for humans — Comments are completely ignored by JavaScript. They are notes for the humans reading the code.
- typeof — what kind of thing is this? — `typeof` tells you the data type of any value:
- Spot the bug — missing quote — This program crashes. A string is not closed properly — a quote is missing.
- Case sensitivity — JavaScript is case-sensitive. `Console.log` is not the same as `console.log`.
- Numbers and arithmetic — JavaScript handles math directly in `console.log` — no extra steps:
- Write it from scratch — No starter code. Blank page. You write the whole thing.
JavaScript Getting Started concepts covered
- The most popular language on Earth