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 trialmunyaradzi kakora
2,944 Pointsconcatenation
how does string concatenation work?
name ="munyaradzi"
"treehouse + loves" ="munyaradzi"
1 Answer
behar
10,799 PointsHey munyaradzi! Your close, string concatenation should look like this:
variable2 = "and its good"
variable1 = "This is a string " + variable2
You got close, but there a four things wrong with your code. First, you should not concatenate the string "munyaradzi", you should concatenate the variable "name". Secondly you shouldent use a plus on the string "Treehouse loves", this is one string and should not be changed. Thirdly the challenge tells you to store the concatenated string into a variable called subject. Finally you need to have a space at the end of your first string to ensure that the name and the string "Treehouse loves" has a space. You havent done this. In the end your code should look like:
name = "munyaradzi"
subject = "Treehouse loves " + name