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 Using Comparison Operators

Zachary Baker
PLUS
Zachary Baker
Courses Plus Student 11,504 Points

I can't complete this challenge due to code issues.

I can't complete this challenge due to a glitch in the code. the console is separate and the code is to the far right and I can't tell what I'm typing.

script.js
var a = 10;
var b = 20;
var c = 30;
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="script.js"></script>
</body>
</html>

I've had a hilarious number of issues with the JavaScript course, or rather it would be hilarious if it wasn't incredibly frustrating. I'm also having issues on this same quiz, except my issue is that for some reason it's totally unable to recognize my code (even though it's working in the browser when it runs each time). This is the second such issue where having identical code to the previous lesson fails and the challenge cannot be completed. I was thinking about trying the TechDegree but if they can't even get the technical issues ironed out of the basic courses I can't imagine paying $200 per month.

I also want to mention that the "Get Help" button does absolutely nothing, so I can't even link to the lesson when I ask a question. I mentioned that to support too, but they totally ignored me. First class job here TreeHouse.

2 Answers

Steven Parker
Steven Parker
231,275 Points

I was curious to see the issue you described, but when I tried the challenge, I saw nothing special. And I was able to easily complete it with a bit of code.

The above messages does appear to have been made with the "get help" button, but before any code was written.

I did see another post written about the same time as yours — perhaps there was a temporary server issue?

I can only say "try again", perhaps after restarting your browser and/or rebooting your machine.

var a = 10; var b = 20; var c = 30;

Found out that the following code is rejected by the challenge verification engine: if ( a > b ) { alert('a is greater than b.'); } else { alert('a is not greater than b.'); }

Whereas this code works: if(a > b){ alert("a is greater than b"); }else{ alert('a is not greater than b'); }

Although the first comparison is syntactically correct it is not interpreted properly by the challenge verification software. Bug?