Intermediate Ruby
Q59 / 100

What does the splat operator "*" do in "def foo(*args)"?

Correct! Well done.

Incorrect.

The correct answer is B) Collects any number of remaining positional arguments into an array named args

B

Correct Answer

Collects any number of remaining positional arguments into an array named args

Explanation

The splat operator "*args" gathers any number of extra positional arguments passed to the method into an array.

Progress
59/100