Number Comma Thousands Separator

const numberWithCommas = (x) => { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); }

Code from Stackoverflow:
How to print a number with commas as thousands separators in JavaScript
https://stackoverflow.com/questions/2901102/how-to-print-a-number-with-commas-as-thousands-separators-in-javascript