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.

Osman Hersi
Courses Plus Student 1,278 Pointsi don't know how to add elements to the tuple
.

Taylor Weeks
4,009 PointsThis was a tricky exercise for me, but I did figure out what it is asking for. After the "->" (which is where you specify what the function will return), you need to name the two strings that will be returned using a colon to separate the name and the type (e.g. found: Bool, description: String).You will also need to make sure the function returns the two values (greeting, language).

Osman Hersi
Courses Plus Student 1,278 PointsI have tried this code:
func greeting(person: String) -> (language: String, greeting: String){ let languages = "English" let greetings = "Hello (person)"
return language - greeting
}
1 Answer

Taylor Weeks
4,009 PointsOsman, your code looks good except for the return line. The syntax for returning a tuple is parentheses with the values separated by a comma. You are also missing a backslash before person in your greetings constant [(person)].
Ricardo Hill-Henry
38,442 PointsRicardo Hill-Henry
38,442 PointsCan you post what you've tried, then we can try to help from there. Likely, it's a matter of just rewatching the video or viewing the documentation to get a better understanding.