Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Harrison Greeves2,920 Points
I've done mine slightly differently but...
my code won't include a space between the adjective, verb, and noun?
<h2>There once was a [adjective] slug who wanted to climb up a tree to [eat] the [noun].</h2>" var adjective = prompt("Give me an adjective"); var part1 = "<h2>There once was a " + adjective; var verb = prompt("Give me a verb"); var part2 = "slug who wanted to climb up a tree to" + verb; var noun = prompt("Give me a noun"); var part3 = "the " + noun ; alert("You're finished!"); var sentence = part1 + part2 + part3; document.write(sentence);
Steve Mustanski15,081 Points
Try putting a space before "slug" and after "to" in part2. Also, before "the" in part3.
var part2 = " slug who wanted to climb up a tree to " + verb;
I also haven't done this exercise, but I would suspect you would need to put a "+ </h2>" after noun in part3 so the line would look like
var part3 = " the " + noun + "</h2>";
Hope that answers your question.