Ex. 37 Data Types Flashcards
1
Q
true
A
True boolean value.
true or false == true
2
Q
false
A
False boolean value.
false and true == false
3
Q
nil
A
Represents “nothing” or “no value”.
x = nil
4
Q
strings
A
Stores textual information.
x = “hello”
5
Q
numbers
A
Stores integers
i = 100
6
Q
floats
A
Stores decimals.
i = 10.389
7
Q
arrays
A
Stores a list of things.
j = [1,2,3,4]
8
Q
hashes
A
Stores a key=value mapping of things.
e = {‘x’ => 1, ‘y’ => 2}