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 trialRobert Vazquez
1,782 PointsReturn types in a Function in Swift
What else I am missing in this function because I replace the println statement with a return statement but The code doesn't work still please help Thanks
func greeting(person: String) -> String {
return person
}
1 Answer
Jhoan Arango
14,575 PointsHello Robert:
You are doing good, but the challenge also says that it should return something that says β Hello Tomβ
func greeting(person: String) -> String{
return "Hello \(person)" // Use string interpolation
}
Robert Vazquez
1,782 PointsRobert Vazquez
1,782 Pointsthank you Jhoan for helping me out