Enumerables Flashcards

1
Q

all?

A

Everything “tested” by the block returns TRUTHY (all must be true in order for it to return TRUTHY)

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

any?

A

Did anything tested by the block return TRUTHY? (Just needs one TRUTHY in order for it to be true)

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

collect

A

A synonym for .map

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

count

A

Which elements satisfy the block OR, without block, how many elements are there?

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

detect

A

Which elements satisfy the block FIRST. (Does the same thing as .find)

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

find_all

A

Which elements satisfy the block?

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

find_index

A

What is the index of the first element to satisfy the block?

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

max

A

Whats the highest value?

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

max_by

A

Whats the highest value based on some property of the element?

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

min

A

Whats the lowest value?

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

sort

A

Put the values in order

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

.map

A

creates a new array after transforming each element

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

.reduce

A

distill a value after joining elements together

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