Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

100
Views
Scientific notation with javascript

I am developing a site with javascript, which does the following, the visitor will enter the unit quantity, the unit to compare and the unit of comparison (Ex: 12 centimeters for millimeter) and it will show how much the quantity of the unit to compare is equivalent to the unit of comparison, the only problem is that if I put a unit to compare too small and a unit to compare too large, it will happen that the result will be wrong (Ex: 17 decimeters for kilometers will give 0, 0170000000000001) so I asked a person and they replied that I should use scientific notation, but I have no idea how to do it in javascript, could anyone help me?

about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

Do you mean something like this?

number.toExponential(x)

x can go from 0 to 20. It's the number of digits after the decimal point.

about 4 years ago · Santiago Gelvez Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!