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
Thomas Covington
Courses Plus Student 203 Pointscombining the treehouse variable with the name variable and the string "loves" and I am to leave a space with each item.
I wrote email_greeting = "Treehouse" + "loves" + "Thomas" ; This is wrong where is my error in this code?
name = "Thomas"
treehouse = "Tree"+"house"
email_greeting = "Treehouse" + "loves" + "Thomas"
1 Answer
Martin Cornejo Saavedra
18,132 PointsThat is not wrong at all, but it's not what has been asked in the challenge. They asked you to use the variable <name> instead of "Thomas". I know the output is the same, but using the variable instead of the value is better to have more control over your programs. Oh and there's a little mistake, you have to use spaces before and after 'loves' so it looks like this:
name = "Thomas"
treehouse = "Tree"+"house"
email_greeting = treehouse + " loves " + name