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 trialJosh Moretti
9,488 PointsStory not appearing in the browser
Not sure why but after the prompts the story doesn't appear in the browser. It was before and I haven't changed anything. Can anyone tell me why? Thank you
var noun3 = prompt ("Enter a persons name"); var adj1 = prompt ("Please type an adjective"); var noun1 = prompt ("Please type a noun"); var verb1 = prompt ("Please type a verb"); var noun2 = prompt ("Enter a 2nd noun");
alert("Tally forth good sir/madam")
var story = noun3 + "Stark walked into the room and exclaimed" + adj1 + " " + noun1 + "is that Ned Starks head" + verb1 + "the Lannisters he exclaimed"; story += "Off to war" + "Snow said Bring me my" + noun2();
document.write(story);
1 Answer
efewafewa
21,825 PointsYou have to take the () off of noun2 at the end of your story because it isn't a function, it's a variable. Should work after that.
Josh Moretti
9,488 PointsThank you
Josh Moretti
9,488 PointsJosh Moretti
9,488 Pointsnvm got it going. Sorry