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 trialSusant B
1,000 PointsI do not see what is wrong in my second answer. It just say " Bummer! Your `result` variable has the wrong value in it.
I do not see what is wrong in my second answer. It just say " Bummer! Your result
variable has the wrong value in it. Check the task instructions again."
func greeting(person: String) -> (language:String, greeting:String) { return ("English", "Hello (person)") }
var result = greeting("Tom")
func greeting(person: String) -> (language:String, greeting:String) {
return ("English", "Hello \(person)")
}
var result = greeting("Tom")
1 Answer
Patrick Cooney
12,216 PointsWhy did you change the return value to include the values that were previously held in variables? Those need to remain in their variables and you need to return the values using the variables.
Susant B
1,000 PointsSusant B
1,000 PointsThanks Patrick for your quick answer.
But, the issue is with the order of variables. I made a minor change and it works.. which is misleading as no where instruction is given that I need to follow order for tuple.
I realized it when I wrote below and still it bumped.