πŸ“Š Ruby
Q. In Ruby, how can you add a key-value pair to an existing hash?
  • (A) Using the `add` method
  • (B) Using the `insert` method
  • (C) Using the `put` method
  • (D) Simply assigning a value to a new key
πŸ’¬ Discuss
βœ… Correct Answer: (D) Simply assigning a value to a new key

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
165
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
91%
Success Rate