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
Phillip Cady
5,150 PointsWrong answer
The challenge task (https://teamtreehouse.com/library/javascript-loops-arrays-and-objects/tracking-multiple-items-with-arrays/using-array-indices) keeps kicking this back to me as the wrong answer, but I'm fairly certain it is correct.
var players = ['Jim', 'Shawna', 'Andrew', 'Lora', 'Aimee', 'Nick']; console.log(players[5]);
Please advise.
Here's a screencap of the issue in action: http://i.imgur.com/JzgIfuR.png
1 Answer
YI LI
4,094 PointsHello Phillip, The question says Log the first name of the array. You need to change console.log(players[5]); to console.log(players[0]);
Phillip Cady
5,150 PointsPhillip Cady
5,150 PointsOh drat, I'm sorry, that was the wrong screen shot. Yes, I got the first answer correct but the next question is log the last item in the array and console.log(players[5]); gets kicked back as the wrong answer. =\
Phillip Cady
5,150 PointsPhillip Cady
5,150 PointsHere is the proper screen cap of the problem...
http://i.imgur.com/cQZEzdp.png
YI LI
4,094 PointsYI LI
4,094 PointsSometimes I do the same thing.... We need to keep the code from previous challenge. So the answer should be
Phillip Cady
5,150 PointsPhillip Cady
5,150 PointsExcellent, thanks!