tags:

views:

40

answers:

1

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
in php we have function number_format which adds floating points like that do we have any function in javascript
Rajesh
that's great.. it worked.. thanqu
Rajesh