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