Methods with Arguments


So i feel as though I've done everything correctly but it still returns the error message "make sure your method takes a single string parameter." And i have given it a single string parameter. What am i doing wrong? can someone please point me in the right direction?

def welcome (n)
    return "Hello, #{name}"

welcome ("robert")


In the instruction they asked to do this..

Change your welcome method definition. Add a single string parameter called name.

def welcome (n) ?
Your parameter is n ?


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