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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![umair awan](https://uploads.teamtreehouse.com/production/profile-photos/121245/micro_winston-churchill.jpg)
umair awan
221 PointsI can't figure out the solution.
"<h2>There once was a [adjective] programmer who wanted to use JavaScript to [verb] the [noun].</h2>"
var objective = prompt("Please type an abjective");
var verb = prompt("Please type a verb");
var noun = prompt("please type a noun");
alert("All Finished");
var sentence = "<h2> There once was a " + objective;
sentence = +- "programmer who wanted to use JavaScript to " + verb + "the " + noun + "." </h2>"
Document.write (sentence);
1 Answer
![Luis Henrique Witz](https://secure.gravatar.com/avatar/f6cd7ec100a8e774d4149469cfffb6b2?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Luis Henrique Witz
16,505 PointsHi friend,
This is what you trying to do?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<h2 id="sentence"></h2>
</body>
<script type="text/javascript">
var adjective = prompt("Please type an adjective");
var verb = prompt("Please type a verb");
var noun = prompt("please type a noun");
alert("All Finished");
var sentence = "There once was a " + adjective + " programmer who wanted to use JavaScript to " + verb + "the " + noun + ".";
document.getElementById("sentence").innerHTML = sentence;
</script>
</html>