Start learning free

LESSON 179 OF 673 · LOOPING OVER LIST INDICES

Get Full Names

Practice

Given two lists of strings, the first names and the last names (given in this order, called firstNames and lastNames in the example), return a list 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