TypeScript builds on JavaScript by adding types, so we can describe exactly what kind of values a variable can hold.
The three most common primitive types are:
string – text values like "Hello" or 'TypeScript'number – all numbers, including decimalsboolean – logical values true or falseYou can assign these types explicitly with :type annotations, or you can let TypeScript infer the type automatically when you give a variable a value. Inference makes code shorter and easier to read, while annotations help catch mistakes in more complex situations.
In this category, you’ll:
These exercises are designed to be a gentle introduction: short, simple problems that give you a quick win while showing the core idea of TypeScript’s type system.