1.

What are the primitive types in TypeScript?

Answer»

TypeScript has three primitive types that are frequently used: string, NUMBER, and boolean. These correspond to the similarly named types in JavaScript. 

  • string: REPRESENTS TEXT values such as “javascript”, “typescript”, etc.
  • number: represents numeric values like 1, 2, 32, 43, etc.
  • boolean: represents a VARIABLE that can have EITHER a ‘true’ or ‘false’ value.


Discussion

No Comment Found