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

JavaScript JavaScript Loops, Arrays and Objects Tracking Multiple Items with Arrays Adding Items to an Array

Calvin Secrest
Calvin Secrest
24,815 Points

The script.js file contains an array called guestLis...

Im not sure if the challenge is asking to include the names in the array or not?

script.js
var guestList = ['Sandra', 'Omar', 'Magnus', 'Becky'];
guestlist.push('name');
guestlist.unshift('name');
printlist(guestlist);
index.html
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JavaScript Loops</title>
</head>
<body>
<script src="script.js"></script>
</body>
</html>

1 Answer

Angela Visnesky
Angela Visnesky
20,927 Points

Hi Calvin, I just went through this code challenge and I did add names into the array. Also, check your guestList variable. You aren't capitalizing the "L" and that will keep you from passing the challenge. I hope this helps!

Calvin Secrest
Calvin Secrest
24,815 Points

Yes it does and thanks for you input