TypeScript is JavaScript with types. Types help you catch mistakes before your code runs, making development faster and more reliable.
Adding a type is simple - just use a colon after the variable name: let name: string = "Alice".
Run this example to see how it works and then try the exercise.
Click "Run" to see the example in action...Your task: Create a greeting message and print it
Click "Run" to execute your code...What does TypeScript add to JavaScript?
SUMMARY
You just wrote your first TypeScript code! Type annotations help catch errors early. Next, you’ll learn about the basic types available in TypeScript.