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

68
Views
Redondeo de moneda MYR

Buscando ayuda para redondear el dinero al 0.05 más cercano en lenguaje js.

Entrada y salida esperada:

 1.10 => 1.10 1.11 => 1.10 (round down) 1.12 => 1.10 (round down) 1.13 => 1.15 (round up) 1.14 => 1.15 (round up) 1.15 => 1.15 1.16 => 1.15 (round down) 1.17 => 1.15 (round down) 1.18 => 1.20 (round up) 1.19 => 1.20 (round up)

ingrese la descripción de la imagen aquí

De: https://www.bnm.gov.my/misc/-/asset_publisher/2BOPbOBfILtL/content/frequently-asked-questions-faqs-on-rounding-mechanism

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Puede tomar una compensación y tomar un valor de piso múltiple.

Si necesita ceros al final, tome .toFixed(2) .

 const format = f => Math.floor((f + 0.025) * 20) / 20; console.log([1.10, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.19].map(format));
 .as-console-wrapper { max-height: 100% !important; top: 0; }

about 4 years ago · Juan Pablo Isaza 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!