Ruby - String Operations
What will be the output of this Ruby code?
str = "Hello" str << " " << "World" puts str
str = "Hello" str << " " << "World" puts str
<< operator returns the modified string, so chaining appends multiple strings.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions