i have variable var fval = 4; now i want out put as 4.00
+1
A:
Javascript only has a Number type that stores floating point values.
There is no int.
Edit:
If you want to format the number as a string with two digits after the decimal point use:
(4).toFixed(2)
Alexandre Jasmin
2010-10-30 06:12:57
in php we have function number_format which adds floating points like that do we have any function in javascript
Rajesh
2010-10-30 06:14:17
that's great.. it worked.. thanqu
Rajesh
2010-10-30 06:17:38