Build a Library Manager - Step 8

Tell us what’s happening:

hi,
could you help , I got the title and author , but it doesn’t pass.

Your code so far

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");


// User Editable Region

function getBookInformation(catalog) {
  return catalog.map((book) => book.title + book.author);
  };










// User Editable Region


console.log(getBookInformation(library));

Your browser information:

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

Challenge Information:

Build a Library Manager - Step 8

Check the example again,

“Atomic Habits by James Clear”,

in this format: TITLE by AUTHOR.

You have title + author

 title: 'Zero to Sold',
 author: 'Arvid Kahl',

what’s wrong about this case ?

If you concatenate title and author will the string be "Zero to Sold by Arvid Kahl"?

yes, that’s right,
how can i change it

How can you change what? Not sure what you mean. Please be specific with examples.

How can I solve the problem? How can I get a solution?

what are you missing in the string you have created?

yes, what is it…?

What IS the problem, in your own words? Ive described it to you in the best way I know so that you can solve it.

Can you describe what is the difference between the requested string and the string you have created?

No one is going to give you the answer but we’ll help you solve this on your own.

You need to try though

The string I created included the title and author combined, but the string you created included the title separately from the author.
Also, I want to solve it myself, I just want some declarations. :slightly_smiling_face:
anyway ,thank you very much

I didn’t create any string, I just showed you what’s in the instructions.

Can you explain this a bit more? How are they separated?

My string here ,it gives my the title and author without any interruption[ ‘Your Next Five Moves: Master the Art of Business StrategyPatrick Bet-David and Greg Dinkin’,

Preformatted text

`

Ok, you know how to concatenate strings, so do you have an idea how you can build the required string?

Actually, no, do you have any link that can explain the situation further, or any example.

you can review this lecture: https://www.freecodecamp.org/learn/full-stack-developer/lecture-introduction-to-javascript/what-is-string-concatenation

return (catalog).map((book) => book.title +", " + book.author)

and is that going to create a string in the format BOOK TITLE by AUTHOR NAME?