1. Home
  2. Javascript
  3. To fixed

toFixed() method takes a single integer as an argument determining how many decimal numbers should the original value be fixed to.

#javascript
(1.7549).toFixed(2); //  Returns 1.75
(1.7551).toFixed(2); //  Returns 1.76
copy
Full Javascript cheatsheet