Primitive Types in TypeScript
Simple types are also called the primitive types and they belong to built-in predefined types found in TypeScript. The primitive data type is number, string, boolean, null type, and undefined types. There are the following primitive or built-in types in TypeScript, which are described below.
Number Type
The number primitive type is the same as the JavaScript primitive type and represents double-precision 64-bit IEEE (Institute of Electrical and Electronics Engineers) 754 format floating-point values. The number keyword is used to represent number type values.
Syntax
- var variablename:number;
- var q=anyNumericValue;