Typescript Numbers

Typescript Literal types String, Boolean, Number & Enum
TypeScript

Typescript String, Boolean, Number & Enum Literal types

TypeScript Literal Types restrict the value of a variable to finite valid values. The latest version of Typescript supports the following Literal Types. String Literal Types,Numeric Literal Types,Boolean Literal Types & Enum Literal Types. This is very useful feature which restrict the possible values, that you can store in a variable

Typescript Numbers
TypeScript

TypeScript Number Data Type

The Typescript number data type stores the numbers as a double-precision 64-bit number The Typescript has two data types to deal with the Numbers. One is a primitive number data type. The other one is BigInt, which is a recent addition. It does not have separate data types like integers, decimal, float as in the other languages. The number is a primitive data type. The Typescript also have Number object. We also have listed the difference between number Vs Number. The Numberobject has many properties & methods, which you can make use of and is listed at the end of the article.

TypeScript EPSILON Floating point precision
TypeScript

Typescript EPSILON & Floating point precision

In this tutorial, we will explain the Typescript Number.EPSILON property. It represents the difference between 1 and the smallest floating-point number greater than 1. It exists because not all decimal numbers can be represented accurately and exactly in the binary system.

Typescript NaN
TypeScript

NaN in Typescript

N in Typescript stands for Not a Number. It is the result of numerical operations, where result is not a number. It is the property of the global object. You can refer it either as NaN or Number.NaN. The typeof NaN is primitive number. We can check whether a value is NaN by using the isNaN function or by Number.IsNan method.

Scroll to Top