Beginner Ruby
Q7 / 100

Which method returns the number of elements in an array?

Correct! Well done.

Incorrect.

The correct answer is B) size or length

B

Correct Answer

size or length

Explanation

Both size and length (aliases of each other) return the number of elements in an array; count also works similarly.

Progress
7/100