This is an example of using the JavaScript toLocaleString() method to format a number with commas as thousands of separators in JavaScript
Click the below button to print the above numbers separated with commas