TypeScript introduces optional static typing, interfaces, and new language features while building on JavaScriptโs foundation. Letโs explore the syntax!
: type annotations to enforce specific data types for your variables.
let and const declare block-scoped variableslet name: string = "Alex";function greet(name: string): voidstring, number, booleanany โ disables type checking (avoid if possible)unknown โ safer alternative to anyvoid โ for functions that don't return a valuenull, undefined