Essential JavaScript

Full Name Kata

You work for a cruise line. Each crew member on each ship needs a name tag with their full name.

You have a database of crew members. Your function will receive a single crew member object and return the full name of that crew member to go on a name tag.

Each crew member object has a firstName and lastName property.

Return the full name of the crew member with a space between the first and last name:

const crewMember = {
  firstName: 'Bob',
  lastName: 'Jones',
const fullName = getFullName(crewMember);
console.log(fullName); // "Bob Jones"

Code Editor