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

how to put a prompt in a variable

i am completing a challenge, and i cannot figure out howto put a prompt inside of a variable so i can later put the answer on the document. please help https://teamtreehouse.com/workspaces/34374562#

1 Answer

example:

var example = prompt("This is a prompt.");

P.S. If you thought that my answer was good you can give it a best answer.