Delivered by FeedBurner
The code speaks for itself.
myNumber = 22/7;
//To round the myNumber to 2 number of decimal places we use the toFixed() method
rounded = myNumber.toFixed(2);
alert("My number is " + rounded);
Sudheer is an entrepreneur and software developer. Get more from Sudheer on Twitter.
nice, thank you
More information about formatting options