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



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

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?