Vidyalelo
Ruby Programming · Q30

Arrays, Hashes and Strings in Ruby

Programming · Ruby Programming · question 30

Q30

Which of the following methods is used to remove a key-value pair from a hash in Ruby?

A.
delete(key)
Answer
B.
remove(key)
C.
erase(key)
D.
exclude(key)

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board