Intermediate Ruby
Q80 / 100

What does "Array#uniq" do?

Correct! Well done.

Incorrect.

The correct answer is B) Returns a new array with duplicate elements removed, preserving the order of first occurrence

B

Correct Answer

Returns a new array with duplicate elements removed, preserving the order of first occurrence

Explanation

uniq removes duplicate values from an array, keeping the first occurrence of each unique element and preserving relative order.

Progress
80/100