JavaScript JavaScript Basics Storing and Tracking Information with Variables Using String Methods

Derek Hutson
Derek Hutson
5,165 Points

Is this not the right variable value?

The error I am getting when I check work says the value the question needs is not the value it asks me to come to in the question... I'm confused just asking the question lol what am I doing wrong?

var id = "23188xtr";
var lastName = "Smith";

var userName = id.toUpperCase() + '#' + 'lastName.toUpperCase()';
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>JavaScript Basics</title>
<script src="app.js"></script>

1 Answer

So close! The mistake you made was making the last part a string in its entirety even though your working with a variable. Remove the quotes on the last part of your answer and you have it.

var id = "23188xtr";
var lastName = "Smith";

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