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 trialDana Feldman
4,475 PointsIs there a way to put a space between variables in document.write.
For example in this challenge if your sentence was more basic and you wanted to write adjective + noun variables in a sentence without a string of words in between.
1 Answer
Geoff Parsons
11,679 PointsYou can always just add a space in the same way you combined the two words:
var sentence = adjective + " " + noun;
Dana Feldman
4,475 PointsDana Feldman
4,475 PointsAt first I saw your answer and I was like nope tried it doesn't work, than I saw where I went wrong, I didn't have the + sign before the noun only after the adjective. Thank you, it worked!