MCQs > IT & Programming > Ruby > What is the purpose of the following hash method in Ruby?

Ruby MCQs

What is the purpose of the following hash method in Ruby?


hash.to_a


Answer

Correct Answer:

It creates a two-dimensional array from hash. Each key/'value pair is converted to an array. and all these arrays are stored in a containing array.    


Explanation:

Note: This Question is unanswered, help us to find answer for this one

Ruby Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Ruby Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it