Learn
Good! Now let’s make our method a bit more complex by adding arguments and a return
statement.
def double(n) return n * 2 end
Instructions
1.
Change your welcome
method definition. Add a single string parameter called name
.
Remove your puts
statement and replace it with return "Hello, #{name}"
Take this course for free
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.