Mega Code Archive

 
Categories / Ruby / Language Basics
 

Understand the difference between numbers and digits

# 12 is a number, but '12' is a string of two digits. puts  12  +  12 puts '12' + '12' puts '12  +  12' # 24 # 1212 # 12  +  12