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
Scott Vojik
6,718 PointsPossible bug found in JavaScript course challenge?
I believe I found a bug in a JavaScript course challenge. I submitted an a bug report via email, but got a message back from support saying it's not broken. However, it is still not letting me move forward. Here is the link:
Here is the challenge: Challenge Task 2 of 2 Now, use console.log() to log out the last item in the array.
Code:
var players = ['Jim', 'Shawna', 'Andrew', 'Lora', 'Aimee', 'Nick']; console.log(players[5]);
Bummer Message: Bummer: Use [ ] and a number to access an item in an array: players[0]
1 Answer
Jennifer Nordell
Treehouse TeacherHi there, Scott Vojik ! Support is correct. This is not a bug. These challenges are cumulative. Each successive task should contain the code that was present in the step before it. Step one asks you to log out the first name and step 2 asks you to log out the fifth name. This means there should be not one, but two console.log() statements. Take a look at this informational tip in the area where the "Bummer!" would appear. This is visible before you hit "Check work":
Important: In each task of this code challenge, the code you write should be added to the code from the previous task.
Hope this helps!
Scott Vojik
6,718 PointsScott Vojik
6,718 PointsAhhh ok, got it. That makes sense. That little important message would be a good thing to display on the second challenge screen!
Jennifer Nordell
Treehouse TeacherJennifer Nordell
Treehouse TeacherScott Vojik it is on every challenge screen before you hit "Check work". But once you hit that, it will be replaced with a Well done! or a Bummer! message