Intermediate Ruby
Q61 / 100

What does "Hash#each_pair" (or "each") yield when iterating over a hash?

Correct! Well done.

Incorrect.

The correct answer is B) Both the key and value for each entry as a pair

B

Correct Answer

Both the key and value for each entry as a pair

Explanation

Iterating a hash with each yields [key, value] pairs, often destructured as "|key, value|" in the block parameters.

Progress
61/100