reduce decimals to 4 digits javascript

Solutions on MaxInterview for reduce decimals to 4 digits javascript by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "reduce decimals to 4 digits javascript"
Joshua
10 Jan 2021
1var myNumber = 2;
2
3myNumber.toFixed(2); //returns "2.00"
4myNumber.toFixed(1); //returns "2.0"
5