How do I add comma's in numbers?

This question was asked by one of our users on Discord.

Feel free to reply to this thread if you have any other queries.

To add comma’s inside the numbers we could we the .toLocaleString() function.

Here’s an example, where we convert a number into Indian rupee format and add commas.

var number = 123456.789;
	return number.toLocaleString('en-IN')