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 trialumair awan
221 PointsModify the function
Greetings, I don't know what I'm doing wrong.
func greeting (person: str) {
println ("Hello")
}
2 Answers
Chris Shaw
26,676 PointsTo answer your original question the challenge won't pass as there is no such type as str
in Swift, here are some valid types just to name a few.
- String
- Int
- Double
- Dictionary
For this challenge you're asked to allow a parameter with a type of String
so you should instead have the following.
func greeting (person: String)
Steve Smith
12,955 PointsIt looks like this question was answered here:
umair awan
221 PointsThose answers are to questions that come after this task.