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 trialBarry Maloney
2,583 PointsStuck again on this challenge
keep getting stuck at the challenge
func greeting(person: String) -> (greeting: String, language: String) {
let language = "English"
let greeting = "Hello \(person)"
return greeting
}
1 Answer
Daniel Sattler
4,867 PointsTry this:
func greeting(person: String) -> (greeting: String,language: String) {
let language = "English"
let greeting = "Hello \(person)"
var greet = (language,greeting)
return greet
}
Basically you will need to assign your tuple to a variable (or constant) and then return THAT new variable
I hope this leads you in the right direction ;-)
Barry Maloney
2,583 PointsBarry Maloney
2,583 Pointsthanks Daniel, unfortunately I'm stuck for the last 20 min on the next challenge which I just posted for help.