0

When i am trying to round off the number upto 2 digits in jquery using isfixed. it is not wokring properly.

Example:

68.165.toFixed(2) return 68.17 which is correct, but when i write 68.175.toFixed(2) its returning 68.17 as well. However it should return 68.18.

Thanks

hims
  • 77
  • 1
  • 9
  • 3
    `isFixed` or `toFixed`? Neither are jQuery functions – Phil Mar 09 '22 at 06:18
  • toFixed is jquery function. You should learn jquery then. – hims Mar 10 '22 at 14:39
  • No, it's a JavaScript function ~ [Number.prototype.toFixed()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed) – Phil Mar 10 '22 at 21:55

0 Answers0