Last Updated: February 25, 2016
·
506
· vsh

Big integers in Ruby

This is not very easy task to visually identify, if for some reason, you have to keep big integer constants in your code:

my_yearly_income = 13484936748

In Ruby, you can separate digits groups, and this way, we can reformat integer like:

my_yearly_income = 13_484_936_748