Ruby - String Operations
Identify the error in the following Ruby code snippet:
text = "Hello" text +<< " World" puts text
text = "Hello" text +<< " World" puts text
+<< together, which is not a valid Ruby operator or syntax.+ and << without spaces or parentheses; this causes a syntax error.+<< -> Option B+<< causes syntax error [OK]+ and << cannot be combined directly [OK]+<< is valid syntax+ to modify original string15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions