MCQs > IT & Programming > Ruby > Ruby code, a = hello world puts a.scan(/(..)(..)/)

Ruby MCQs

What is the output of the following code in Ruby?

a = "hello world"

puts a.scan(/(..)(..)/)


Answer

Correct Answer:

he

ll

o

wo

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