Displaying a number in Indian format using Javascript

i’m late but i guess this will help 🙂 you can use Number.prototype.toLocaleString() Syntax numObj.toLocaleString([locales [, options]]) var number = 123456.789; // India uses thousands/lakh/crore separators document.getElementById(‘result’).innerHTML = number.toLocaleString(‘en-IN’); // → 1,23,456.789 document.getElementById(‘result1’).innerHTML = number.toLocaleString(‘en-IN’, { maximumFractionDigits: 2, style: ‘currency’, currency: ‘INR’ }); // → ₹1,23,456.79 <div id=”result”></div> <div id=”result1″></div>

Quickest way to convert a base 10 number to any base in .NET?

Convert.ToString can be used to convert a number to its equivalent string representation in a specified base. Example: string binary = Convert.ToString(5, 2); // convert 5 to its binary representation Console.WriteLine(binary); // prints 101 However, as pointed out by the comments, Convert.ToString only supports the following limited – but typically sufficient – set of bases: … Read more