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 trialAlex Lang
1,110 PointsWhat did I do wrong? nothing is working?
var noun = prompt ('Please Type a Noun'); var answer1 = noun;
var verb = prompt ('Please Type a Verb'); var answer2 = verb;
var adjective = prompt ('Please type an Adjective'); var answer3 = adjective;
document.write('<h1>Hello, my name is Gary and I am a "+ answer1 +".<h1><h2>I often like to "+ answer2 +" for my morning exercise.<h2><h3>I am very "+ answer3 +", I hope this does not scare you.<h3>');
alert("Typing up story now!")
var story = answer1 + answer2 + answer3
document.write(story)
1 Answer
Steven Parker
231,271 PointsIt's probably "working" but not doing what you intended. Since in the first "document.write", the entire argument is enclosed with apostrophes ("single quotes"), then everything between them will be shown as-is, quotes and all. If you change the apostrophes on the outside to quotes that match the ones used in the rest, then the quotes and plus signs will not be shown and the variable values will appear instead of the variable names.
Alex Lang
1,110 PointsAlex Lang
1,110 PointsI just found out that the "s" in "story.js" was capitalized on accident and messed up everything but now I have it fixed and it works! Thanks for trying to help me! :)
Steven Parker
231,271 PointsSteven Parker
231,271 PointsSometimes the problem can be in a place you don't expect. That's why if possible, always make a "snapshot" of your workspace and post the link to it.