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 trialAdeyemi Lawal
988 Pointsname = 'yemmey' subject ="Treehouse loves" + name. Why is the above answer not correct according to the work space?
OK! Make a new variable named subject that concatenates (uses the + sign) the string "Treehouse loves" and your name var
name = 'yemmey'
subject ="Treehouse loves" + name
3 Answers
Ari Misha
19,323 PointsHiya Randy! I agree! But notice the detail in the challenge which says concat name variable with "Treehouse loves"(see without space). Thats why i added an extra space to the string concat. In real world problem, i'd never do that. I did it , just for the sake of the challenge. Thats it! But your way is a correct way as well. (:
Adeyemi Lawal
988 PointsThanks @Ari and @Randy
Ari Misha
19,323 PointsHiya Adeyemi! Looks like you missed space between "Treehouse loves" string and "name" variable. Your code should look like this:
name = "yemmy"
subject = "Treehouse loves" + " " + name
Randy Eichelberger
1,491 PointsYou really should just add a space after loves and not do a + " " +
Randy Eichelberger
1,491 PointsRandy Eichelberger
1,491 PointsRight and
"Treehouse love " + name
is still concatenated ;)