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

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); '''