Primitive types

Before understanding how we declare variables and functions with types in TypeScript, let's briefly look at primitive types, which are the most basic types. Primitive types are simple values that have no properties. TypeScript shares the following primitive types with JavaScript:

  • string: Represents a sequence of Unicode characters
  • number: Represents both integers and floating-point numbers
  • boolean: Represents a logical true or false
  • undefined: Represents a value that hasn't been initialized yet
  • null: Represents no value
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.137.243