Start learning free

LESSON 149 OF 349 · LOOPING OVER ARRAY INDICES

Get Full Names in Swift

Practice

Given two arrays of strings named firstNames and lastNames, return an array containing the full names (separated by one space)

Example:

Input:   firstNames = ["John","Andy","Mary"]
         lastNames = ["Doe","Smith","Johnson"]

Output:  ["John Doe", "Andy Smith", "Mary Johnson"]
STEP 1 OF 5
    Ctrl + Enter to check

    Get Full Names in Swift

    Keep going with SwiftAbout 340 step-by-step lessons, from your first line of code to coding interviews. Free to start.
    Start learning free