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.

JavaScript JavaScript Basics (Retired) Storing and Tracking Information with Variables The Variable Challenge Solution

What is wrong with my story? Syntax? VerbAdjNoun order?

"<h2>There [verb] an[adjective] man from [noun].</h2>"

var verb = prompt("please enter a verb"); var sentence = "<h2>There " + verb; var adjective = prompt("please enter an adjective"); var noun = prompt("please enter a noun"); alert("Are you ready to read your story?"); sentence += " a " + adjective; sentence += " man from " + noun + ".</h2>"; document.write(sentence);

1 Answer

Jamin Pratt
seal-mask
.a{fill-rule:evenodd;}techdegree
Jamin Pratt
Full Stack JavaScript Techdegree Student 1,920 Points

As far as grammar goes you have it asking for a noun instead of a location. so the order ( Went, Tree, green,)
will output

There went a green man from tree.

try this ''' JavaScript var verb = prompt("please enter a verb"); var sentence = "<h2>There " + verb; var adjective = prompt("please enter an adjective"); var noun = prompt("please enter a noun"); alert("Are you ready to read your story?"); sentence += " a " + adjective;

sentence +=/Here/ noun + "from Sicily" + ".</h2>"; document.write(sentence); '''