• support@answerspoint.com

converting integer to float with precision 2 using Javascript or Jquery

3204

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 6 years ago
  • Community  wiki

Your Answer

    Facebook Share        
       
  • asked 6 years ago
  • viewed 3204 times
  • active 6 years ago

Best Rated Questions