Google News
logo
TypeScript - Interview Questions
What are the primitive types in TypeScript?
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.
Advertisement