0
Is it possible to use JavaScript libraries in SoloLearn?
I'm writing some code that has to do with pi, and I need to calculate it to quite a significant number of decimal places. Without using any libraries, I can use the toFixed() function, but it seems to only work for displaying the number, and not for calculating it (it just stops calculating beyond a specific point). I was wondering if I have to use a JS library or not, and if so, is it possible to use them in SoloLearn? Thanks in advance!
6 Respuestas
+ 1
If I recall correctly, Javascript isn't the best when getting accurate decimal numbers. But yeah, you should definitely try using some outside libraries. I just did a simple Google search and saw bignum as one people use for precise decimal digits.
0
Ah I see! I'm just doing this as a fun project and not for anything serious, so I'm not too worried about getting super accurate decimal numbers. I'll go check out some libraries now. Thank you for the answer!
0
No problem! Happy coding! 😁
0
David (DonDejvo) The main focus of the OP's question was about libraries, not just this one case. So the downvote you did does not make sense because I answered accurately about being about to use libraries in SL.