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

I cannot get the final sentence to display on the web page?

here is my code what am i doing wrong

var fruit = prompt("Please type a fruit") var place = prompt("think of a creative place") var character = prompt("think of a character real or fake") alert("thanks for playing my game."); Document.write("who lives in a " + fruit + "under the " + place + charcter);

2 Answers

The d in document is lowercase. And in your document.write statement you misspelled character.

var fruit = prompt("Please type a fruit"); 
var place = prompt("Think of a creative place");
var character = prompt("Think of a character real or fake"); 
alert("thanks for playing the game!"); 
document.write("<p> who lives in a " + fruit + " under the " + place + " " + character + "!</p>"); 

I added some pizzazz to it XD also if my answer helped you please up vote it or vote it best answer! Thank you!