Intermediate
Ruby
Q54 / 100
What does "Array#select" (alias filter) return?
Correct! Well done.
Incorrect.
The correct answer is B) A new array containing only the elements for which the block returns true
B
Correct Answer
A new array containing only the elements for which the block returns true
Explanation
select (filter) returns a new array with only the elements that satisfy the block's condition, leaving the original array unchanged.
Progress
54/100