Introduction to TypeScript
What is TypeScript, why type safety? First typed variables and how TS catches errors before running.
Simple enough for a 5-year-old to understand
TypeScript = JavaScript + Types
TypeScript adds "types" on top of JavaScript. All your JS code works here too; additionally, you can specify the types of variables.
Benefit: catches errors before the code runs.
let userName: string = "Alex";let age: number = 36;console.log(userName, age);🎯 Exercise & Practice
Test what you've learned — answer, write code, check instantly. (2 left)
🎯 Expected output: Athens