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 trialClare Bagley
1,695 Pointsin Challenge task 2 of 3 of Swift Functions and Optionals - error message given for correct(working) name passing
Challenge task 2 of 3 in Swift Functions and Optionals.
Receive message"Bummer, your greeting
printed "Hello Tom" when called with "XYZZY" as the parameter. It should have printed "Hello XYZZY". Yet my code (copied & pasted) works within xcode playground.
4 Answers
ankushdharkar
7,530 PointsPut proper spaces. Sometimes the Treehouse editor just wants spaces properly put and Xcode is fine without it.
Jorge Escalante
Front End Web Development Techdegree Student 2,080 PointsI had the same problem. There is a bug in that challange :s
Timothy Clark
2,383 PointsFor some reason the Treehouse editor wants XYZZY instead of Tom.
gökhan sayılgan
2,285 Pointsdefine your name variable at the out of function , we can call variables in our function that we define before
Jeremy Hayden
1,740 PointsJeremy Hayden
1,740 PointsI may be doing something wrong, but I don't see your code.