Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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