• support@answerspoint.com

converting integer to float with precision 2 using Javascript or Jquery

3230

I want to convert the integer to floating number with precision 2. ie. -

18 => 18.00

65 => 65.00

Please help me.

Thank you.

1Answer


0

If you want to convert the integer to floating number

Use .toFixed() function

var num = 445;
num.toFixed(2); //"445.00"

 

  • answered 7 years ago
  • Community  wiki

Your Answer

    Facebook Share        
       
  • asked 7 years ago
  • viewed 3230 times
  • active 7 years ago

Best Rated Questions