Primitive Types & Annotations
Understand TypeScript primitive types and how to annotate variables.
Intro to Primitives
Goal: Explore primitive types (string, number, boolean, null, undefined, bigint, symbol) and annotate variables clearly.
String & number
string and number are the most common primitive types. Use annotations for clarity when needed.
let title: string = "TypeScript";
let version: number = 5.4;
console.log(title, version);All lessons in this course
- Primitive Types & Annotations
- Type Inference & any vs unknown
- Union & Literal Types (basic narrowing intro)