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 trialAR Ehsan
7,912 PointsChallenge Task 2 of 2 Call the greeting function and pass it the String "Jerry"
I am stuck!
func greeting(#person: String) {
println("Hello \(person)")
}
greeting(String: "Jerry")
1 Answer
Devin Scheu
66,191 PointsHey, instead of saying String:, you want to say person: like this:
func greeting(#person: String) {
println("Hello \(person)")
}
greeting(person: "Jerry")
If you think my answer was good, feel free to mark it as best answer below, if you need more help in the future from me, you can contact me at devinwscheu@gmail.com.
AR Ehsan
7,912 PointsAR Ehsan
7,912 PointsThanks! But somehow I figured it out!
AR Ehsan
7,912 PointsAR Ehsan
7,912 PointsI will mark as best answer if you could help me with the decomposing tuples challenge! Here is my code! Challenge 3 of 3 func greeting(person: String) -> (greeting : String,language : String ){ let language = "English" let greeting = "Hello (person)"
AR Ehsan
7,912 PointsAR Ehsan
7,912 Pointsfunc greeting(person: String) -> (greeting : String,language : String ){ let language = "English" let greeting = "Hello (person)"
Devin Scheu
66,191 PointsDevin Scheu
66,191 PointsHey, this is the code I got for this challenge: