Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.

Abraham Zambrano
Abraham Zambrano
5,957 Points
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!