Welcome to the Treehouse Community
Looking to learn something new?
Nikola Jankovic10,793 Points
Just wont read .length ...
var question1= prompt('What is your name'); // 3. Add a second a prompt dialog to capture input from the user and store it in a second variable var question2= prompt('What is your surname'); // 4. Create a third variable and which combines an uppercase version values in the two other variables separated by a space. For example, if the first two variables contain "sally" and "forth", this third variable should contain the string value "SALLY FORTH" var broj= document.write(question1.toUpperCase()+ ' ' +question2.toUpperCase() ); // 5. Create a fourth variable to store a number. The number should be the total number of characters in the third variable. var complete= broj.length; // 6. Add an alert dialog box that says "The string '[insert value of third variable here]' is X number of characters long." For example, if the third variable contained the string "SALLY FORTH" then the alert dialog should says "The string 'SALLY FORTH' is 11 characters long." alert("The string " + complete );
Steven Parker216,083 Points
You have some stray code in there.
It's a bit hard to read without markdown formatting, but on your step 4 line instead of assigning your value based on combining the strings, you assign it to the result of calling "
document.write" with the string combination as the argument. Calling "
document.write" is not part of this challenge.
Please see the Markdown Cheatsheet link at the bottom of the "Add an Answer" section for instructions on how to format posted code.