Created
June 1, 2018 07:07
-
-
Save domofactor/97c01b9935133ddb95c737b9603adc45 to your computer and use it in GitHub Desktop.
ayako learns about data types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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