I am using c# string.Format(format,value) function but I want to achieve this in javascript which I would like to give me the same result which c# give me. Below is the example in c# :
string.Format (62.505152, {0:0.0}) this will return me 62.5
string.Format (62.505152, {0:0.00}) this will return me 62.51
string.Format (62.505152, {0:0.1%}) this will return me 62511%
How can I achieve above examples in javascript which should give me the same return results?