Ruby - Methods
Identify the problem in this Ruby code:
str = "test" str.capitalize puts str
str = "test" str.capitalize puts str
capitalize and capitalize!capitalize returns a new string with first letter capitalized but does not change original.puts strstr was not changed, it prints "test" instead of "Test".capitalize is non-bang. -> Option A15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions