when to place comma in javascript code example Example: add comma to number javascript var n = 34523453.345 n.toLocaleString() "34,523,453.345"