0 votes
in TypeScript - JavaScript's Superset by
List out the built-in data types in TypeScript.

1 Answer

0 votes
by

In TypeScript, the built-in data types are also known as primitive data types and the list include:

  1. Number: This represents number type values. The numbers are stored as floating-point values in TypeScript.
  2. String: A string represents a sequence of characters stored as Unicode UTF-16 code.
  3. Boolean: This represents a logical value. When we use the Boolean type, we get the output only in true or false.
  4. Null: Null represents a variable whose value is undefined. It is not possible to directly reference the null type value itself.
  5. Undefined: The Undefined type denotes all uninitialized variables.
  6. Void: A void is the return type of the functions that do not return any type of value.
...