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 trialAbdurahman Sharif
1,205 Pointswhy is this not the right answer?
i'm supposed to simply call the function with the name Jerry. this seems so easy but i cant get why i'm not doing it correct?
func greeting(#person: String) {
println("Hello \(person)")
}
greeting("Jerry")
1 Answer
Luke Buśk
21,598 PointsI have no idea about Swift, only was reading about it during lunch breaks when i was bored but i believe that if you provide an external parameter name for a parameter (in this case Person), then that external name should be used while calling the function:
greeting(person: "Jerry")
Abdurahman Sharif
1,205 Pointsyes thats exactly what i was missing. thanks Luke!!
Luke Buśk
21,598 PointsThen im glad, happy coding!
Abdurahman Sharif
1,205 PointsAbdurahman Sharif
1,205 Pointsomg, im so dumb.i got it to work. sorry for posting this question.
all i had to write was
greeting(person: "Jerry")
for anyone else who gets stuck on this challenge