Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Object-Oriented JavaScript Object Basics Reviewing Object Basics

I'm not quite sure of the value of the book.

It asks for the value of the book but I thought the titles were the values.

3 Answers

Steven Parker
Steven Parker
229,744 Points

If you are referring to the question that asks: "What is the value of book.genres[3]?" it's looking for one of the genres, not the title.

Andreas Nyström
Andreas Nyström
8,887 Points

Which of the questions in the quiz is throwing you off?

The first question is "What is the value of book.genres[3]?". As you can see the book is an object holding 4 properties: title, author, rating and genres. These properties then holds values. The first question is which value is represented in book.genres[3]. As it is an array and array always starts on 0 it would be like this:

book.genres[0] = Classics book.genres[1] = Plays book.genres[2] = Fiction book.genres[3] = Romance

const book = {
   title: 'Romeo and Juliet',
   author: 'William Shakespeare',
   rating: 3.74,
   genres: ['Classics', 'Plays', 'Fiction', 'Romance']
}

Any clearer? If not, just ask again!

I tried Romance but it gave me a bummer.

Steven Parker
Steven Parker
229,744 Points

That's the correct answer, perhaps you had a typo?

Andreas Nyström
Andreas Nyström
8,887 Points

Doesnt it sooner or later for us all?

If you used 'Romance', try just Romance. It worked for me.