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 trialGordon Odame-Adjei
2,294 PointsSwift Functions & Optionals
Hello There,
I seem to be stuck on this challenge.
I tried the below code in xcode and it worked
func greeting(person: String) {
println("Hello \(person).")
}
greeting("Tom")
Yet when I try to check the code in the Team Treehouse code checker it does not work for some reason.
Where am I going wrong, am I missing something?
Many Thanks
func greeting(person: String) {
println("Hello \(person).")
}
greeting("Tom")
2 Answers
Justin Reed
Full Stack JavaScript Techdegree Student 33,918 PointsXelas got it right. While your code will go through an xcode playground treehouse is looking for code that works and is exactly what they are asking for. Your code would kick out "Hello Tom."
And treehouse wants "Hello Tom"
Annoying but something to keep in mind for future challenges
Gordon Odame-Adjei
2,294 PointsThanks very much Alexander and Justin!
Alexander Davison
65,469 PointsAlexander Davison
65,469 PointsYou are very close! Don't put the period at the end of the "Hello (person)" thing. Code: