var vl = '2.02222225'; alert([typeof +(+vl).toFixed(2),+(+vl).toFixed(2)]); alert([typeof ((vl*100|0)/100),(vl*100|0)/100]);