...

/

Quiz on Blocks

Quiz on Blocks

Take a quiz on block concepts.

We'll cover the following...
1

What’s the output of the following code?

p [5, 3, 4, 2, 1].detect { |number| number.even? } 
A)

4

B)

2

C)

[4, 2]

D)

nil

Question 1 of 40 attempted

Loginto save progress

Iterators

Exercise 2: Even Reversed

Loginto save progress