DEV Community

Kellington Chidza
Kellington Chidza

Posted on

1 1

Urgent Assistant on this IOS CODE, stuck

Given the struct below in the editor, we want to add a method that returns the person’s full name. Declare a method named fullName() that returns a string containing the person’s full name. Note: Make sure to allow for a space between the first and last name.

func getFullName() -> String {
return "(firstName) (lastName)"
}
}


where am i getting it wrong

Top comments (1)

Collapse
 
charlesvu profile image
Charles Vu

You are missing the '\' before the opening parenthesis.

func getFullName() -> String {
    return "\(firstName) \(lastName)"
}

Sentry mobile image

App store rankings love fast apps - mobile vitals can help you get there

Slow startup times, UI hangs, and frozen frames frustrate users—but they’re also fixable. Mobile Vitals help you measure and understand these performance issues so you can optimize your app’s speed and responsiveness. Learn how to use them to reduce friction and improve user experience.

Read full post →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay