Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Kim Dallas
11,461 Pointsi've done it everyway possible. it still won't work.
i've tried with a space and a comma. before and after. i've tried it with just a space before the comma. nothing is working.
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

Jason Anders
Treehouse Moderator 145,624 PointsHi Kim Dallas
You're close. Everything is syntactically correct, but if you have a look at the error message the Code Checker is giving, it will tell you exactly what is wrong:
Bummer: You must pass a string with a comma AND a space -- ', ' -- as the argument to the
.join()
method.
You are passing a space AND a comma AND a space. If you delete that first space the task will pass.
Nice work! :)

Kim Dallas
11,461 Pointsthank you. Jason. so the space has to be behind the comma.
Kim Dallas
11,461 PointsKim Dallas
11,461 Pointsi've tried that Jason. I tried var monthsString = months.join (' ,'); console.log (monthsString); and it still won't work. it's driving me nuts. it's like it's stuck no matter what I do.
Jason Anders
Treehouse Moderator 145,624 PointsJason Anders
Treehouse Moderator 145,624 PointsIn your comment, you now have space and comma instead of comma and space.
The code does pass if you take the original code above and just delete the first space there: