Concatenate First and Last Name

STRING

Problem

Given two strings firstName and lastName, return a single string that combines these two names with a space in between.

Examples

concatenateName("John", "Doe") // "John Doe" concatenateName("Jane", "Smith") // "Jane Smith" concatenateName("Alice", "Johnson") // "Alice Johnson"
Loading...