Separate number by comma with using `gsub`:
def separate_by_comma(number) number.to_s.reverse.gsub(/(\d{3})/, '\1,').reverse endwithout:
def spearate_by_comma(number) number.to_s.chars.reverse.each_slice(3).map(&:join).join(",").reverse end