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 trialmacmillandesign
Courses Plus Student 8,424 PointsNot understanding why this answer doesn't work.
console.log(players[5]);
This should log out the last name of 6 names in an array. The quiz says it doesn't. What am I missing?
var players = ['Jim', 'Shawna', 'Andrew', 'Lora', 'Aimee', 'Nick'];
console.log(players[5]);
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JavaScript Loops</title>
</head>
<body>
<script src="script.js"></script>
</body>
</html>
1 Answer
Jason Anello
Courses Plus Student 94,610 PointsYou have to keep your previous log statement from task 1 and add to it for task 2.
macmillandesign
Courses Plus Student 8,424 Pointsmacmillandesign
Courses Plus Student 8,424 PointsThanks, Jason!