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 trialKim Dallas
11,461 Pointsit's exactly how it says to do it
it has the ',' string?
var months = ['January','February','March','April','May','June','July','August','September','October','November','December'];
var monthsString = months.join (',');
console.log (monthsString);
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JavaScript Loops</title>
</head>
<body>
<script src="script.js"></script>
</body>
</html>
2 Answers
Steven Parker
231,269 PointsThe instructions say that "the array items should be separated by a comma AND a space", but at the moment, you only have the comma.
Kim Dallas
11,461 Pointsi've tried it with a space. it still won't work. i'll try it again.
Steven Parker
231,269 PointsRemember to use both the comma and the space, and you should pass.
buddha acharya
Courses Plus Student 4,023 Pointsyour code should work. may be you have spaces on console and join method.
this can simply be done console.log(months.join(', '));
Kim Dallas
11,461 Pointsit'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.
Cheo R
37,150 PointsCheo R
37,150 PointsYou're just missing a space.