ObjectiveMcq
Print Protected
This page is protected for print. Use the website to view the content.
What is the output of the given code
a=["hey", "ruby", "language"]
b=[puts b[puts a[2]
Correct Answer: B — 2
a and b are both ["hey", "ruby", "language"]. In Ruby, two arrays with the same elements in the same order are equal, so output is 'Equal'.