I am wanting to display large numbers more nicely with commas. So if the number was say 123456789, it would display 123,456,789. I have looked around but I only found code t
There's a simpler syntax for toLocaleString:
Number(x).toLocaleString();
This lets you drop the number in as a variable instead of converting the number into an object.