Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

iOS Swift Functions and Optionals Parameters and Tuples Named Parameters

help please

Call the greeting function and pass it the String "Jerry"

named_parameters.swift
func greeting(person: String) {
    println("Hello \(person)")
}

6 Answers

your answer is not working

i didn't get you

I just made a correction to the answer that I just provided . Check it out

Kieran Tross
Kieran Tross
8,266 Points

Did the same thing. that doesn't work.

greeting("Jerry")

anyone have any suggestions?

Kieran Tross
Kieran Tross
8,266 Points

ok i just found the answer.

"greeting(person: ("Jerry")'

this solves the code.

You just need to call the function :

             greeting( "Jerry")

i didn't understand please if you can write the whole code and give me please

I don't really get what you are saying but listen you have a function which is called greeting and takes a string parameter and return a new concatenated sentence like hello jerry. The task is to called this function and passed a name into it .

           greeting("Jerry")

Now "Jerry" is a string that is now passed into the greeting function and the function will return Hello Jerry