Skip to content

Instantly share code, notes, and snippets.

@domofactor
Created June 1, 2018 07:07
Show Gist options
  • Save domofactor/97c01b9935133ddb95c737b9603adc45 to your computer and use it in GitHub Desktop.
Save domofactor/97c01b9935133ddb95c737b9603adc45 to your computer and use it in GitHub Desktop.
ayako learns about data types
#variables
## simple data types
myname = 'terrell' #string
puts 'im #{myname}' #just one big string
puts "i'm #{myname}" #variable expansion and '
myage = 0 #integer
myheight = 6.0 #float
deadday = nil #nil
alive = true #boolean
## Complex/Advanced data types
myarray = ['1','2','3'] # array,list - ordered things
myhash = {car: 'red', name: 'terrell'} # hash/map - unordered things, key/value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment