Build a Library Manager - Step 11

Tell us what’s happening:

Your getBookSummaries function should return an array.

Your code so far


// User Editable Region

function getBookSummaries(catalog) {
  return catalog.map(book => book.about);
}


// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36

Challenge Information:

Build a Library Manager - Step 11

do you still have the rest of the code?

Your solution works from my end. Please try one of the following steps to move forward.

Click on the “Restart Step” button and force a refresh of your page with CTRL + F5 then try to paste the code in again.

or - Try the step in incognito or private mode.

or - Disable any/all extensions that interface with the freeCodeCamp website (such as Dark Mode, Ad Blockers, or Spellcheckers), and set your browser zoom level to 100%. Both of these factors can cause tests to fail erroneously.

or - Ensure your browser is up-to-date or try a different browser.

I hope one of these will work for you.

No I can’t be see the rest of the code

please reset the step to restore the rest of the code

Tell us what’s happening:

They said I should create a getBookSummaries function.

const library = [
{
title: ‘Your Next Five Moves: Master the Art of Business Strategy’,
author: ‘Patrick Bet-David and Greg Dinkin’,
about: ‘A book on how to plan ahead’,
pages: 320,
},
{
title: ‘Atomic Habits’,
author: ‘James Clear’,
about: ‘A practical book about discarding bad habits and building good ones’,
pages: 320,
},
{
title: ‘Choose Your Enemies Wisely: Business Planning for the Audacious Few’,
author: ‘Patrick Bet-David’,
about:

Your code so far


// User Editable Region

function getBookSummaries(books) {
  return books.map(book => book.about);
}

console.log(getBookSummaries(library));


// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36

Challenge Information:

Build a Library Manager - Step 11

it does not look like you followed the suggestion to reset the step, please do that

const library = [
{
title: ‘Your Next Five Moves: Master the Art of Business Strategy’,
author: ‘Patrick Bet-David and Greg Dinkin’,
about: ‘A book on how to plan ahead’,
pages: 320,
},
{
title: ‘Atomic Habits’,
author: ‘James Clear’,
about: ‘A practical book about discarding bad habits and building good ones’,
pages: 320,
},
{
title: ‘Choose Your Enemies Wisely: Business Planning for the Audacious Few’,
author: ‘Patrick Bet-David’,
about:
“A book that emphasizes the importance of identifying and understanding one’s adversaries to succeed in the business world”,
pages: 304,
},
{
title: ‘The Embedded Entrepreneur’,
author: ‘Arvid Kahl’,
about: ‘A book focusing on how to build an audience-driven business’,
pages: 308,
},
{
title: ‘How to Be a Coffee Bean: 111 Life-Changing Ways to Create Positive Change’,
author: ‘Jon Gordon’,
about: ‘A book about effective ways to lead a coffee bean lifestyle’,
pages: 256,
},
{
title: ‘The Creative Mindset: Mastering the Six Skills That Empower Innovation’,
author: ‘Jeff DeGraff and Staney DeGraff’,
about: ‘A book on how to develop creativity and innovation skills’,
pages: 168,
},
{
title: ‘Rich Dad Poor Dad’,
author: ‘Robert Kiyosaki and Sharon Lechter’,
about: 'A book about financial literacy, financial independence, and building wealth. ',
pages: 336,
},
{
title: ‘Zero to Sold’,
author: ‘Arvid Kahl’,
about: ‘A book on how to bootstrap a business’,
pages: 500,
},
];

console.log(“Books in the Library:\n”);

function getBookInformation(catalog) {
return catalog.map(book => ${book.title} by ${book.author}).join(“\n”);
}

console.log(getBookInformation(library));

now please add the function again, without deleting anything

I added this function:

function getBookSummaries(books) {
return books.map(book => book.about);
}

But still didn’t pass the test.

please share all the code you have in the editor

const library = [
  {
    title: 'Your Next Five Moves: Master the Art of Business Strategy',
    author: 'Patrick Bet-David and Greg Dinkin',
    about: 'A book on how to plan ahead',
    pages: 320,
  },
  {
    title: 'Atomic Habits',
    author: 'James Clear',
    about: 'A practical book about discarding bad habits and building good ones',
    pages: 320,
  },
  {
    title: 'Choose Your Enemies Wisely: Business Planning for the Audacious Few',
    author: 'Patrick Bet-David',
    about:
      "A book that emphasizes the importance of identifying and understanding one's adversaries to succeed in the business world",
    pages: 304,
  },
  {
    title: 'The Embedded Entrepreneur',
    author: 'Arvid Kahl',
    about: 'A book focusing on how to build an audience-driven business',
    pages: 308,
  },
  {
    title: 'How to Be a Coffee Bean: 111 Life-Changing Ways to Create Positive Change',
    author: 'Jon Gordon',
    about: 'A book about effective ways to lead a coffee bean lifestyle',
    pages: 256,
  },
  {
    title: 'The Creative Mindset: Mastering the Six Skills That Empower Innovation',
    author: 'Jeff DeGraff and Staney DeGraff',
    about: 'A book on how to develop creativity and  innovation skills',
    pages: 168,
  },
  {
    title: 'Rich Dad Poor Dad',
    author: 'Robert Kiyosaki and Sharon Lechter',
    about: 'A book about financial literacy, financial independence, and building wealth. ',
    pages: 336,
  },
  {
    title: 'Zero to Sold',
    author: 'Arvid Kahl',
    about: 'A book on how to bootstrap a business',
    pages: 500,
  },
];

console.log("Books in the Library:\n");

function getBookInformation(catalog) {
  return catalog.map(book => `${book.title} by ${book.author}`).join("\n");
}

console.log(getBookInformation(library));

console.log("\nList of book summaries:\n");

function getBookSummaries(books) {
  return books.map(book => book.about);
}

I’ve edited your post to improve the readability of the code. When you enter a code block into a forum post, please precede it with three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add the backticks.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

Your solution works from my end. Please try one of the following steps to move forward.

Click on the “Restart Step” button and force a refresh of your page with CTRL + F5 then try to paste the code in again.

or - Try the step in incognito or private mode.

or - Disable any/all extensions that interface with the freeCodeCamp website (such as Dark Mode, Ad Blockers, or Spellcheckers), and set your browser zoom level to 100%. Both of these factors can cause tests to fail erroneously.

or - Ensure your browser is up-to-date or try a different browser.

I hope one of these will work for you.

1 Like