Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Web Technology by (7k points)

Does parseDouble method exist in JavaScript? If it exists can I parse a 21 digit number?

1 Answer

0 votes
by (13.1k points)

It is natively not possible to deal with a 21-digit number in JavaScript.

JavaScript has only one kind of number and it is “number”. parseFloat is equivalent to a parseDouble in  Java but it provides only 16 digits of precision and reading 21 digits will lose 5 significant digits.

 If you want more precision use the “big number” library.

Want to be a full stack developer? Check out the full stack developer course from Intellipaat.

Related questions

0 votes
1 answer
asked Feb 25, 2021 in Web Technology by Jake (7k points)
0 votes
1 answer
0 votes
1 answer
asked Jan 21, 2021 in Web Technology by dev_sk2311 (45k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...