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
Written by Igor Fedoronchuk
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Related Tags
#ruby
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#