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 trialErik Robles
Courses Plus Student 10,635 PointsOops! It looks like Task 1 is no longer passing. Arrays Challenge Task 2 of 2
I keep getting the "Oops! It looks like Task 1 is no longer passing." message. I am pretty sure I have the right answer. I am trying to select the last element in the arrat. Any help? Thanks.
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
Ryan S
27,276 PointsHi Erik,
In each task, your code should be added to the code from the previous task. It looks like you replaced your console.log()
statement from Task 1 with the new one in Task 2. That is the reason for the "Task 1 no longer passing" message, because the code isn't there.
Erik Robles
Courses Plus Student 10,635 PointsErik Robles
Courses Plus Student 10,635 PointsThank you. I thought it only wanted to access the last item so, yes, I just replaced the 0 with a 5. Thank you for your help.