carolineartz
4/20/2014 - 10:12 PM

SELF ASSIGNMENT & INCREMENTING http://blog.carolineartz.me/ruby-operators/

SELF ASSIGNMENT & INCREMENTING http://blog.carolineartz.me/ruby-operators/

x = 1           #=>1  
x += x          #=>2  
x -= x          #=>0  
x += 4          #=>x was 0 so x= + 4 # x is positive 4  
x *= x          #=>16  
x **= x         #=>18446744073709551616 # Raise to the power  
x /= x          #=>1