Ruby - String Operations
What is the output of this Ruby code?
text = " Ruby Rocks " puts text.strip.downcase
text = " Ruby Rocks " puts text.strip.downcase
strip methodstrip removes spaces from start and end, so " Ruby Rocks " becomes "Ruby Rocks".downcase methoddowncase converts all letters to lowercase, so "Ruby Rocks" becomes "ruby rocks".15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions