TypeScript Tutorial

TypeScript Syntax

TypeScript Syntax

Every TypeScript program has rules for how statements are written and executed.

  • Follow TypeScript syntax rules for statements and blocks
  • Use comments to document code
  • Run examples in the Try it editor

Example

let course: string = "WEB-401";
let price: number = 1899;
console.log(course, price);
Try it Yourself