Codington
0 of 10 problems solved • 0%
Use in a course

Exercise prompt

Join a First and Last Name

With strings, the + operator joins text instead of doing arithmetic. Any spaces you want in the result must be included in one of the strings.

Example

const first = "Grace"; const last = "Hopper"; const full = first + " " + last;

This produces Grace Hopper. Your exercise joins another name.

Your task

Join firstName and lastName in fullName with a space between them. The console should display Ada Lovelace.