How can I do this way?


#1



https://www.codecademy.com/courses/ruby-beginner-en-d1Ylq/3/3?curriculum_id=5059f8619189a5000201fbcb#


each method calls on a separate line


#Here's my failed try
name = 'Mihai'
name.downcase
name.reverse
name.upcase


#2

you can chain methods (lowercase, uppercase, reverse) together:

name.method1.method2.method3

as shown in the instructions


#3

no, I want the other way by writing multi-lines I knew how to use the one-line chain methods


#4

but then you would need to save the conversion done:

name = 'Mihai'
name = name.downcase
#and so on

othwerise, you don't store the result anywhere


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.