Map the peoples of Ray such as their first name comes first in the string in js code example

Example 1: Map the peoples of Ray such as their first name comes first in the string in js

const authors = [
  { firstName: "Beatrix", lastName: "Potter" },
  { firstName: "Ann", lastName: "Martin" },
  { firstName: "Beverly", lastName: "Cleary" },
  { firstName: "Roald", lastName: "Dahl" },
  { firstName: "Lewis", lastName: "Carroll" }
];
let fullAuthorNames;

// fullAuthorNames should be: ["Beatrix Potter", "Ann Martin", "Beverly Cleary", "Roald Dahl", "Lewis Carroll"]
// Write your code below

Example 2: Map the peoples of Ray such as their first name comes first in the string in js

fullAuthorNames = authors
  .map(authors => `${authors.firstName} ${authors.lastName}`);
console.log(fullAuthorNames);