Examveda

What does the `each_key` method do when called on a hash in Ruby?

A. Iterates over each key-value pair in the hash

B. Iterates over each key in the hash

C. Iterates over each value in the hash

D. None of the above

Answer: Option B


Join The Discussion

Related Questions on Arrays, Hashes and Strings in Ruby