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 trialBen Masel
2,004 PointsHello! I need to be steered on the right path because i don't really understand what to do, can anyone help?
Hi! I'm only 11 and I'm having trouble with this particular code challenge. I can't understand what I'm supposed to do and i haven't quite got structures down. Can u help?
struct Person {
let firstName: String
let lastName: String
func getFullName() -> String {
let Name = "\(firstName) \(lastName)"
return Name
}
}
let fullName =
1 Answer
Alia Khan
3,733 Pointsstruct Person {
let firstName: String
let lastName: String
func getFullName() -> String {
return "\(firstName) \(lastName)"
}
}
let aPerson = Person(firstName: "Benjamin", lastName: "Masel")
let fullName = aPerson.getFullName()
Alia Khan
3,733 PointsAlia Khan
3,733 PointsTry this :)
Also if I was you I wouldn't rush and move on, start from scratch re watch the videos re do the code challenges. Focus on understanding what is being said and try to write your own code. Ive completed this challenge like a month ago and I am still revisiting it as I don't think I understand it fully and I still forget certain things.
Each time you re watch the videos you will learn something new that you missed last time, and it solidifies your understanding.
Alia
Ben Masel
2,004 PointsBen Masel
2,004 PointsThx!
Ben Masel
2,004 PointsBen Masel
2,004 PointsSorry! I kept trying and I didn't understand the compiler when it said i made a mistake. So i kept starting from scratch.