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

181
Views
how to convert 4 decimal string to 2 decimal string in typescript

I'm getting value like this.

data[0].percentage='0.0000'

I want this value as =

'0.00'

how to convert

'0.0000' to '0.00'

i tried

parseFloat(data[0].percentage).toFixed(2) 

im getting NaN

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

0

const percentage = '0.0000';
console.log(Number(percentage).toFixed(2));

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!