Primitive Types

What are these *types* we talk so much about?

Essential Types

The primitive types in TypeScript and JavaScript are: string, number, and boolean.

  • string: Represents a sequence of characters
  • number: Represents a number. It can be an integer like 10 or float like 1.9. Everything is simply a number.
  • boolean: Used to represent true or false values.
Loading...