Urgent Assistant on this IOS CODE, stuck

twitter logo github logo ・1 min read

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

twitter logo DISCUSS (1)
markdown guide
 

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

func getFullName() -> String {
    return "\(firstName) \(lastName)"
}
Classic DEV Post from Apr 18

The Weird Rules I Set Myself That Got Me a Job

Kellington Chidza profile image
I'm a creative and innovation guy anyone can rely with based with my experience as a VA.Loosing is my greatest challenge, my failure is my motivation, so i never loose, i learn.