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

JavaScript

How can I combine two variables in a string method?

This challenge is a real pain in the butt.

var id = “23188xtr”; var lastName = “Smith”;

var userName = id.toUpperCase();

3 Answers

Hi Tianni

Just add a "+" between them:

var id = 23188xtr; 
var lastName = Smith;

var userName = id.toUpperCase() + lastName.toUpperCase();

It says opps looks like task 1 is no longer passing. It could be buggy.

Hi Tianni What is the task asking you to do and what was your code?

How did you upload that picture? It’s easier for me to just screen shot.

Hi Tianni

On the Challenge, there's a "get help" button, which will post the challenge or you can copy and paste the questions and your code.