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

james chhun
james chhun
5,932 Points

syntax error Finally, add a # symbol and lastName in uppercase to the end of the userName string. The final value of use

im not sure exactly what i have wrong here

app.js
var id = "23188xtr";
var lastName = "Smith";

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

1 Answer

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 47,417 Points

You aren't concatenating # and lastName

this

userName +="#"lastName.toUpperCase();

should be

userName +="#" + lastName.toUpperCase();