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 trialAndrew Crowe
2,586 PointsFeedback on this quiz.
Thank you, TeamTreehouse, for such excellent, clear training!
Just a humble bit of feedback: There is a task in this quiz that I believe is phrased incorrectly or at least incomplete enough to be misleading. It's posed like this:
" Finish the code below to write the message "I'm a programmer!" to the web page: _______ . ________("I'm a programmer!") "
The answer that is accepted as correct is "document.write". However, without wrapping the message in some kind of HTML tags we wouldn't add anything to the page at all, am I correct? We would simply add a line of uninterpretable text to the HTML file.
I think this could be confusing to some newcomers so I thought I'd point it out. Thank you!
~andrew
3 Answers
John Steer-Fowler
Courses Plus Student 11,734 PointsHi Andrew,
You are correct that you can write HTML within the document.write
function. This is useful for displaying a string as a second level header for example.
However, if you don't include any HTML into the function, just a string, I believe that it will still display on the webpage (but only as a paragraph
which is the default I believe).
For this reason, I believe the quiz is correct.
Landon S
3,433 PointsI think the purpose of this question was to showcase the three ways to add js files to and Html document. This particular question just wanted a particular way, assuming we have an Html wrapper.
Brigitt Arndt
9,498 Pointsmy period is so high it looks like a -, not a .