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 trialhakop taturyan
245 Pointshow do i string these variables?
im stuck and cant find my error
let firstName;
let lastName;
let role = 'developer';
firstName += "Jack";
lastName += "Taturyan";
let msg = firstName + " + " lastName ":" + role ;
hakop taturyan
245 PointsLee B i just fixed it and it gave me an error, i feel like its such a silly mistake i keep overlooking
1 Answer
Steven Parker
231,269 PointsIn addition to a missing concatenation operator, it looks like another one got placed inside a string (" + " lastName
) instead of between it and the variable (" " + lastName
).
Lee B
1,141 PointsLee B
1,141 PointsClose! You're missing a
+
between lastName and":"