add comma to numbers js to class code example Example: add comma to number javascript var n = 34523453.345 n.toLocaleString() "34,523,453.345"