AI Hints
Home›TypeScript Tutorial›Getting Started
TypeScript · Lesson 1 of 120

What Is TypeScript

JavaScript with types.

⏱ 2 min read▶ Video at 0:00🎓 Free
Watch this lesson in the TypeScript courseWatch on YouTube ↗Full TypeScript course

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.

What Is TypeScript
From the video: What Is TypeScript
  • 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.

keyvalue
Startfrom zero
Every examplereal code
Checked bythe TypeScript compiler
Run withNode

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