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 JavaScript Loops, Arrays and Objects Tracking Multiple Items with Arrays Review Array Basics

Max Henchman
Max Henchman
894 Points

I believe there is a bug here. It asks to print out the 4th item in the array which would be [3].

see above^

christopher abramson
christopher abramson
22,740 Points

Make sure to list the question and your answer when asking questions like this so that we can help! :)

2 Answers

Max Henchman
Max Henchman
894 Points

Oh i was just doing one of the quizzes and I believe it was bugged so i clicked "get help" and it took me here. The question was essentially asking you to console.log the 4th string in the array, typing console.log(array[3]); said it was wrong when it wasn't... no worries.

Hey Max,

The answer would not be:

console.log(array[3]);

You're being prompted to alert the user of the 4th item in the array. You also want to make sure that you are selecting the correct array, which is in this case is messages and not simply array.

alert(messages[3]);