Learn the difference between var, let, and const in TypeScript.
TypeScript inherits JavaScript's three ways to declare variables, but const and let are almost always preferred over var.
constUse const when the binding won't be reassigned. It's the default choice.
const greeting = "Hello, World!";
TypeScript infers the type automatically — greeting is string.
letUse let when you need to reassign the variable later.
let count = 0;
count = count + 1; // ✓
var — avoid itvar has function scope (not block scope) and can cause subtle bugs. Ignore it.
Declare a const named greeting with the value "Hello, World!" and export it so the tests can check it.
export const greeting = "...";
// Declare an exported constant named 'greeting' // with the value "Hello, World!"