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.

JavaScript JavaScript Basics (Retired) Storing and Tracking Information with Variables Combining Strings

Sem van Westen
Sem van Westen
2,434 Points

Step 3 of the code challenge does not validate correctly

My last name has 2 parts with a space in between. The third exercise of the code challenge requires me to concatenate firstName + ' ' + lastName. The codechecker does not accept this because it does not detect an extra space between the two parts of my last name (the space is embedded in the lastName variable instead of concatenated). When I reduced my last name down to one word, it got through the checker.

Sem van Westen
Sem van Westen
2,434 Points

It does not accept:

var firstName = "Sem";
var lastName = "van Westen";
var fullName = firstName + " " + lastName;

It does accept:

var firstName = "Sem";
var lastName = "vanWesten";
var fullName = firstName + " " + lastName;

The treehouse codechecker requires me to concatenate the spaces. It does not allow for spaces to be embedded in the firstName and lastName variables.

William Li
William Li
Courses Plus Student 26,867 Points

it appears that you're right. Let's pm Dave McFarland for a possible change to the grader. Thanks for pointing that out, Sem.

1 Answer

Dave McFarland
STAFF
Dave McFarland
Treehouse Teacher

Hi Sem van Westen

You certainly shouldn't need to change your name to pass our code challenges! I'll update that code challenge.

Thanks for letting me know.

Dave McFarland
Dave McFarland
Treehouse Teacher

Hi again Sem van Westen

I've fixed the code challenge. In fact, your name is now immortalized in the programming I created to test this code challenge within the Treehouse application!