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
Luqman Shah
3,016 Points[SOLVED] What is my mistake??!
var adjInput = prompt("Please type an adjective");
var vrbInput = prompt("Please type a verb");
var nounInput = prompt("Please type a noun");
var nounInputT = prompt("Please type another noun");
alert('Thank you, now...what shall the message be..?');
var message = "<h2>You are a(n) " + adjInput ;
message += nounInput + " that likes to ";
message += vrbInput + " ontop of a(n) " + nounInputT + "!</h2>;
document.write(message);
So the console tool shows that my mistake is on line 8, which is message += vrbInput + " ontop of a(n) " + nounInputT + "!</h2>;
But I compared my code with the teacher's, in the course. And it seems like my code is correct :/
Whenever I remove the closing h2 tags, it works, but I need the h2 tags...
Luqman Shah
3,016 PointsLuqman Shah
3,016 PointsNever mind, I spotted it, it was a simple mistake of forgetting to add the closing quotation marks after the closing h2 tag. It works now haha! I'm sure we've all been there.