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.

kevin nadjarian
1,498 PointsHi Tayler, thanks,
I just cannot get the code correct with a string :
func greeting(person: String) -> String { return "tom" }
println("hello (greeting("tom"))")
the result is "hello (Function)" and not hello tom
3 Answers

kevin nadjarian
1,498 PointsYes that what I did too sorry but I cannot get still have an issue
func greeting(person: String) -> String { return person }
println("hello (greeting("tom"))")
I also try with
func greeting(person: String) -> String { return person }
println("hello (greeting(tom))")
And also try
func greeting(person: String) -> String { return "tom" }
println("hello (greeting(tom))")
Can some one give me the correct answer for this exercices "Function return type" in Swift Functions and Optionals courses
Thank you

Jeremy Hayden
1,740 PointsYou forgot the / for string interpolation. "Hello /(greeting...

kevin nadjarian
1,498 PointsThe solution was like this, finded my answer.
func greeting(#personName: String) -> String { let greetings = "Hello, " + personName + "!" return greetings }
println(greeting(personName: "Kevin"))
Tyler Simko
5,610 PointsTyler Simko
5,610 PointsHey Kevin,
Hopefully I can help - what's your question?