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

Paul Marshall
seal-mask
.a{fill-rule:evenodd;}techdegree
Paul Marshall
Full Stack JavaScript Techdegree Student 3,950 Points

So 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

Antti Lylander
Antti Lylander
9,686 Points

Please share your code and explain which part is not working.

Adam Beer
Adam Beer
11,314 Points

Show 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

3 Answers

Adam Beer
Adam Beer
11,314 Points

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

the 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
Antti Lylander
9,686 Points

Please, 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);

can you please be more specific in your question ?

Antti Lylander
Antti Lylander
9,686 Points

Don't forget to mark best answer so everybody knows it's solved. :)