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 trialSrikanth Srinivas
1,465 Pointsi can't proceed, even though this is correct.
func greeting(person: String) { println("Hello (person)") }
thats my code thats supposed to be a custom function that types in the name of a person and adds a greeting "Hello" before their name, although this code is correct, i can't proceed from the challenge and even check the compiler which has no errors. The pop up still says my code could not be compiled though.
func greeting(person: String) {
println("Hello \(person)")
}
2 Answers
Josh Boldt
17,196 PointsThis quiz is being finicky. Try refreshing and entering your code again. It's correct. Make sure there are no unnecessary lines (shouldn't make a difference, but it did for me).
Farhad Mohammad Afzali
5,007 PointsI think it requires named parameter. Try one of the following:
func greeting(person person: String)
or func greeting(#person: String)
Good luck