How to format a number literal within a JavaScript expression
I’ve written a JavaScript function to add thousands separators (,) to numeric literals within an expression,
My current code works fine but breaks when the expression contains numbers already formatted with commas.
For example