Data Type Examples Flashcards

Name the data type

You may prefer our related Brainscape-certified flashcards:
1
Q

true or false == true

A

true: True boolean value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

false and true == false

A

false: False boolean value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

x = nil

A

nil: Represents “nothing” or “no value”.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

x = “hello”

A

strings: stores textual information

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

i = 100

A

numbers: Stores integers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

i = 10.389

A

floats: Stores decimals

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

j = [1,2,3,4]

A

arrays: Stores a list of things

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

e = {‘x’ => 1, ‘y’ => 2}

A

hashes: Stores a key=value mapping of things

How well did you know this?
1
Not at all
2
3
4
5
Perfectly