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 trialPaul Marshall
Full Stack JavaScript Techdegree Student 3,950 PointsSo the program is not running correctly at the moment why ? i copy the work perfectly and it does not operate correctly,
WTF im getting irritated
Adam Beer
11,314 PointsShow your code.
Code
Wrap your code with 3 backticks (```) on the line before and after. If you specify the language after the first set of backticks, that'll help us with syntax highlighting.
```html
<p>This is code!</p>
```
or
You can use the snapshot function in the workspace and provide the link to that
Paul Marshall
Full Stack JavaScript Techdegree Student 3,950 Points"<h2> This program is [adjective].</h2>" var adjective = prompt('Please type an adjective'); document.write('adjective');
3 Answers
Adam Beer
11,314 PointsYour code absolutely correctly. You wrote it wrong. Please fixed your document.write(). Inside the document.write() you use apostrophs, but this is not a string, this is a variable name. Hope this help.
document.write('adjective');
change to
document.write(adjective);
Lucas Leniek
1,028 Pointsthe h2 tag is not working in the end where it does not holding the message in the coding. I can't advance this class, and I don't understand.
Antti Lylander
9,686 PointsPlease, share all your code and tell us what you think it should do. It will be easier then to say. Take a snapshot.
"<h2> This program is [adjective].</h2>"
I'm not sure if you know but [adjective] above does not have any special behavior. It is just plain text. You can't have placeholders in a string like that. That can be accomplished with template literals though. For now, I suggest you watch the few last videos again and do it like Dave teaches. You need to concatenate it.
like so:
var adjective = prompt('Please type an adjective');
var sentence = "<h2>The program is " + adjective;
document.write(sentence);
Cristian Opran
6,963 Pointscan you please be more specific in your question ?
Paul Marshall
Full Stack JavaScript Techdegree Student 3,950 Pointsthanks Cristian Oprah but this issue has been resolved
Antti Lylander
9,686 PointsDon't forget to mark best answer so everybody knows it's solved. :)
Antti Lylander
9,686 PointsAntti Lylander
9,686 PointsPlease share your code and explain which part is not working.