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 Using Array Methods

it's exactly how it says to do it

it has the ',' string?

script.js
var months = ['January','February','March','April','May','June','July','August','September','October','November','December'];
var monthsString = months.join (',');
console.log (monthsString);
index.html
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JavaScript Loops</title>
</head>
<body>
<script src="script.js"></script>
</body>
</html>
Cheo R
Cheo R
37,150 Points

You're just missing a space.

2 Answers

Steven Parker
Steven Parker
229,744 Points

The instructions say that "the array items should be separated by a comma AND a space", but at the moment, you only have the comma.

i've tried it with a space. it still won't work. i'll try it again.

Steven Parker
Steven Parker
229,744 Points

Remember to use both the comma and the space, and you should pass.

your code should work. may be you have spaces on console and join method.

this can simply be done console.log(months.join(', '));

it's like its stuck buddha. i'm having trouble with treehouse sticking on everything. i've cleared my cookies like treehouse asks. it's still not working right.