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 trialRyan B.
3,236 PointsCan I get s second pair of eyes on my code, please?
I'm not getting the prompt message when i refresh.
"<h2> There once was a [adjective] programmer who wanted to use JavaScript [Verb] the [Noun].</h2>"
var adjective=prompt('Please add an Adjective ');
var sentence= "<h2>There once was a " + adjective;
var verb=prompt('Please add a verb');
var noun=prompt('Please add a noun');
alert('All done. Ready for message?');
sentence + = 'programmer who wanted to use JavaScript ' + verb;
sentence + = ' the ' + noun + '. </h2>';
document.write(sentence);
1 Answer
Jose Soto
23,407 PointsYou will need to remove the space between your '+' and '='. It is confusing javascript. It should look like '+='.
I hope that helps! Cheers.
Ryan B.
3,236 PointsRyan B.
3,236 PointsAll good. Thank you!