Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript Object-Oriented JavaScript Object Basics Reviewing Object Basics

Luke Kennedy
Luke Kennedy
11,661 Points

book["author"]

I notice that the answer might be missing something. I used book.author it worked but when I used the bracket notation. It didnt seem to go through. I type it book["author"].

Is anyone facing the same problem? because from the videos I thought they mean the same thing

1 Answer

Ezell Frazier
Ezell Frazier
22,110 Points

Did you test the problem in your browser's console? Because your answer is technically correct, but may not have been what was taught in the instructor's video.

I will note that the quizzes are tied a bit too hard to the preceding video, but it is what it is.

Luke Kennedy
Luke Kennedy
11,661 Points

Hi Ezell,

Yup I did it on the browser's console. It worked. Not sure why though it didnt work for me in the quiz, might be a glitch in the answer where they forgot to add that answer in the "if(answer === "book['author']") statements". LOL so JS language. I am just guessing that is how they did the quiz, I might be wrong.

Thanks for the reply.