In JavaScript, is there any way to convert a decimal number (such as 0.0002) to a fraction represented as a string (such as \"2/10000\")?
0.0002
2/10000\"
I
I just want a leave one alternative that I found to convert decimal numbers into fractions and reducing fractions, it's a JS library.
The library calls fraction.js, it was really helpful for me and save me a lot time and work. Hope can be useful to somebody else!