TypeScript · Lesson 1 of 120
What Is TypeScript
JavaScript with types.
TypeScript is JavaScript, with types added. You write the same code you already know, plus small labels that say what kind of value each thing holds. A number, a piece of text, a list of orders.

- JavaScript
- Plus types
- Small labels
JavaScript and TypeScript
In JavaScript, a variable can hold anything, and mistakes show up when the code runs. In TypeScript, you say what a variable holds, and mistakes show up while you type, before the code ever runs.
JavaScript
- let price = 20Anything goesBugs found when running
TypeScript
- let price: number = 20Types are checkedBugs found while typing
How this course works
We start from zero, one small step at a time. Every example is real code, checked by the real TypeScript compiler, and run with Node. You'll see the exact output, and the exact errors.
| key | value |
|---|---|
| Start | from zero |
| Every example | real code |
| Checked by | the TypeScript compiler |
| Run with | Node |
Summary
TypeScript is JavaScript with types, and it finds mistakes before your code runs. Next, why types help.
Key takeaways- JavaScript + types
- Checked early
- Real code
Next up: Why Types Help — catch bugs early