DEV Community

Kellington Chidza
Kellington Chidza

Posted on

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)"
}