Below is my code implementation:
var someNumber = 123.456;
someNumber = someNumber.toFixed(2);
alert(typeof(someNumber));
//alerts string
The toFixed() method returns a string but I want to round the number to 2 decimal places. Can anyone tell me how to do it?