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 JavaScript Basics (Retired) Storing and Tracking Information with Variables Using String Methods

Winnie Huang
Winnie Huang
871 Points

id+#+lastName

I know how to uppercae urerName but now i am stuck by add # Can I just add # in front of Smith?

Need you help and thank you :)

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

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

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

var userName=id+"#"+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

Hi Winnie,

You're adding the "#" symbol just fine. The issue here is that you're missing the .toUpperCase() method on your id variable. Add that back on and it should pass the code challenge.

Let me know if you need anymore help!

Winnie Huang
Winnie Huang
871 Points

Ha Ha Ha!!!! didn't know that is so easy :p

I passed that challenge !!! Thank you :D

Winnie Huang
Winnie Huang
871 Points

Hi! Justin,

I don't know how to add some space on each link in Navbar on Bootstrap? Would you please help me out? Here's my code below:

<style> .jumbotron{ padding: 230px 230px; } .text{ text-align: right; } li{ display: inline; }

ul {
   list-style-type: none;
   line-height:40px;
   text-align: right;
   margin-right: 30px;
   letter-spacing:.1em;
   }

li a:link, li a:visited{ text-decoration: none; } </style> </head>

<body> <header> </header> <ul > <li><a href="#">About</a></li> <li><a href="#">Profolio</a></li> <li><a href="#">Contact</a></li> </ul>

<a href="#" class="pull-left"><img src="img/download.jpg"></a>
<div class="jumbotron">
  <div class="text">
   <h1>Hello, world!</h1>
  <p>This is my first bookstrap webiste</p>
  </br>I am so excited to get started, because
  </br>This is going to be my step to jump into IT World!
  <p></p>
    <a class="btn btn-default" href="#"role="botton">Want more about how I build?</a>
  </div>
</div>