How to print a number with commas as thousands separators in JavaScript
I used the idea from Kerry’s answer, but simplified it since I was just looking for something simple for my specific purpose. Here is what I have: Show code snippet The regex uses 2 lookahead assertions: a positive one to look for any point in the string that has a multiple of 3 digits in … Read more