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) Making Decisions with Conditional Statements Introducing Conditional Statements

my program is working and it is saying tha i am wrong '

this is a little bug and it should be fixed my answer is correct and the code is working yet the workspace says that I am wrong

app.js
var answer = prompt("What is the best programming language");
if ( answer==='Javascript') {
  alert('you are correct');
}
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>

Thanks, I figured it out. I think the code challenges are a bit to particular.

3 Answers

Colin Bell
Colin Bell
29,679 Points

Capitalize the 's' in JavaScript

app.js
var answer = prompt("What is the best programming language");
if ( answer==='JavaScript') {
  alert('you are correct');
}

You forgot to capitalize the "s" in JavaScript in your conditional statement. That should work. if not let us know.

Thanks, I figured it out. I think that particular challenges was a bit too particular.