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 trialJason Berry
5,180 PointsI'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
231,184 PointsIf 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
8,887 PointsWhich 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!
Blessing Phiri
20,261 PointsI tried Romance but it gave me a bummer.
Steven Parker
231,184 PointsThat's the correct answer, perhaps you had a typo?
Andreas Nyström
8,887 PointsDoesnt it sooner or later for us all?
Steven Parker
231,184 PointsVery funny, Andreas!
Jacob Spade
Front End Web Development Techdegree Student 16,624 PointsIf you used 'Romance', try just Romance. It worked for me.