1. Home
  2. Javascript
  3. To fixed
#javascript

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

(1.7549).toFixed(2); //  Returns 1.75
(1.7551).toFixed(2); //  Returns 1.76
copy
Full Javascript cheatsheet
Sitemap Git repository