Javascript

NaN in JavaScript

NaN in JavaScript stands for Not a Number. It is the result of numerical operations, where result is not a number. It is represented by a special property of the global object with the name NaN. NaN is also property of the number object and can refer it using the 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.

NaN in JavaScript Read More »

Number Data Type in JavaScript

The JavaScript number data type stores the numbers as a double-precision 64-bit number The JavaScript 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 JavaScript also have Number object. We also have listed the difference between number Vs Number. The Number object has many properties & methods, which you can make use of and is listed at the end of the article.

Number Data Type in JavaScript Read More »

Scroll to Top