Pages

Sunday, February 5, 2017

Javascript toFixed(): display fraction upto 2 decimal point

A javascript method of floating point object toFixd(precisionPoint) will round the fraction part to given precisionPoint
var floatNumber = 1.23456;
paarseFloat(floatNumber).toFixed(2);
will make 1.23456 to 1.23.

No comments :

Post a Comment