js convert a string with commas to number code example Example: javascript number to number with commas var number = 3500; console.log(number.toLocaleString());