Learning js should be fun. It is fun if it's easy.
I tried my best in writing this, to understand it easily.
datatypes
BigInt
There are very large numbers like 9007199254740995(2^53) and Js can't store them using Number data type.
If we do the following calculation, Js stores the approx value.
Below, 1 is added & Js can't store the result with Number datatype.
Solution: BigInt
Adding n to the end of the number tells Js that it is a BigInt datatype. Js can successfully store the very large number.
Leave y'r thoughts....
The above is the detailed content of Js in bits - (datatypes - BigInt). For more information, please follow other related articles on the PHP Chinese website!