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 trialAmy Tomey
12,847 Pointsnothing shows up... i don't know why? please help!
here is the html: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Practice JavaScript Variables</title> <script src="practice.js"></script> </head> <body>
</body> </html>
and here is the Java:
var firstname = prompt('What is your first name?');
var lastname = prompt('What is your last name?');
var fullname = firstname.toUpperCase() + " " + lastname.toUpperCase();
let fullnamelength = fullname.length;
alert(The string \"" + fullname + "\" is " + fullname.length + " characters long.");
2 Answers
Jessie Starborne
6,875 PointsLooks like your alert() function is missing a double quote right at the start of your first string-
You wrote:
alert(The string \"" + fullname + "\" is " + fullname.length + " characters long.");
It should be:
alert("The string \"" + fullname + "\" is " + fullname.length + " characters long.");
Hope this helps! ^^
Justyn Phearson
2,886 PointsRemove the . from fullnamelenth inside the string.