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 trialTerry C
Full Stack JavaScript Techdegree Student 276 PointsIs my solution wrong? It works but it's kinda different than whats in the solution video.
var firstName = prompt("What is your first name?");
var lastName = prompt("What is your last name?");
var firstName = firstName.toUpperCase() + ' ';
var lastName = lastName.toUpperCase();
var firstLast = firstName.concat(lastName);
var totalCharacters = firstLast.length;
alert(`The string '${firstLast}' is ${totalCharacters} charcters long.`);
1 Answer
KRIS NIKOLAISEN
54,971 PointsYou shouldn't declare variables more than once. For example:
var firstName = firstName.toUpperCase() + ' ';
should just be:
firstName = firstName.toUpperCase() + ' ';
Terry C
Full Stack JavaScript Techdegree Student 276 PointsTerry C
Full Stack JavaScript Techdegree Student 276 PointsOh wow thanks! I knew something was off