Click to See Complete Forum and Search --> : Round to 2 decimal place


Alv
01-11-2004, 10:32 PM
Is there a function where I can round a calculated results to 2 decimal places? For example,

var a, b, c;
a = 10;
b = 3;
c = a / b;

c = 3.33333333 and I would just love to see 3.33 only.

Thanks in advance.

fredmv
01-11-2004, 10:56 PM
alert((10/3).toFixed(2));