toLocaleString() The toLocaleString() method returns a string with a language-sensitive representation of this number. var number = 3500; console.log(number.toLocaleString()); // Displays "3,500" if in U.S. English locale