Last Updated: September 09, 2019
·
601
· igorf

Large numbers syntax in Ruby

Ruby has a special syntax for representing large numbers in literals.
1000000 is a difficult to read for human because of many zeros.
So we can use underscore character as a place separator

my_big_number = 10_000_000_000
=> 10000000000