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 trialLewis Cowles
74,902 PointsBroken test
Yeah so I was using unshift, it does work, it does add 3 names and no one of them is not blank (which is such a stupid error, I cannot begin to think how the test is failing)
Tested in JsFiddle with addition of adding to DOM via document.body.innerHTML appending.... http://jsfiddle.net/qppjdju7/
var guestList = ['Sandra', 'Omar', 'Magnus', 'Becky'];
guestList.push('armand','luca');
guestList.unshift('Jim','Amelia','Kurt');
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JavaScript Loops</title>
</head>
<body>
<script src="script.js"></script>
</body>
</html>
2 Answers
Dave McFarland
Treehouse TeacherI'm terribly sorry about the error Lewis Cowles
I'ved fixed the problem and the code challenge should now work: https://teamtreehouse.com/library/javascript-loops-arrays-and-objects/tracking-multiple-items-with-arrays/adding-items-to-an-array
Thanks for bringing this error to our attention. If you find another error like this in the course feel free to contact me directly via e-mail: dave@teamtreehouse.com.
Lewis Cowles
74,902 PointsNP Dave McFarland, TBH I just wanted the points, and to know I could send a junior off to polish his JS ;) Have a great Friday and weekend!
Raymond Wach
7,961 PointsThere have been a couple other questions about this challenge that agree the test is broken.
Lewis Cowles
74,902 PointsThanks for that, the problem is they did not show up when I was writing the question, so what exactly was this meant to add?
Oh just FYI, after completing the rest of the course I went to the forums to check
https://teamtreehouse.com/forum/topic:javascript/code-challenge:5762
NOTHING!!!! SO NEXT TIME IF YOUR NOT GOING TO HELP PLEASE DON'T ANSWER OR COMMENT
Raymond Wach
7,961 PointsAll I had to do was search for the actual method the challenge asks you to use.
Chris Shaw
26,676 PointsChris Shaw
26,676 PointsTagging Dave McFarland so he can investigate this.