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 The Solution

My Exercise solution

I have the same result, except for the quote into the name, but my doubt is about the code, isn't the same as the teacher but if it has the same result, it is ok?

var name = prompt('Hey, What is your name?'); var lastName = prompt('Now please tell me your last name'); var fullName = name + ' ' + lastName;

alert('The string ' + fullName.toLocaleUpperCase() + ' is ' + fullName.length +' characters long');

3 Answers

Federico Lemaire, I've updated the alert section to include the " " around the name. I hope this helps.

var name = prompt('Hey, What is your name?'); var lastName = prompt('Now please tell me your last name'); var fullName = name + ' ' + lastName;

alert("The string \"" + fullName.toLocaleUpperCase() + "\" is " + fullName.length + " characters long");

Hey Tyler! Thanks for your reply and for the update! I wanna ask you (If you don't mind) about the way I code that it is in a different way as the teacher does it in the video. Is that ok, I mean the way I did it?

Yes, the way you did it is fine. I would say that when you do a challenge your code will probably almost always look a little different. When I compare my code with the teachers or others from the community that has been posted I'll look at their style to see if there is a way for me to write a more streamlined way.

Thanks Tyler!