[thelist] JavaScript: trim function?

Damien COLA damiencola at wanadoo.fr
Fri Nov 14 11:05:08 CST 2003


x = 4234.343899238;
y = Math.round(x*100) / 100.0;

print y 
> 4234.34

I know this is re-inventing the wheel, but I don't know Javascript
enough.

-----Original Message-----
> Math.round() is a built-in JavaScript function ...

Which gives me 4234...i need the two decimal places...



More information about the thelist mailing list