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

It seems all correct to me, is this a bug?

Hi, The check for this challenge doesn't seems to work

https://teamtreehouse.com/library/javascript-basics/making-decisions-with-conditional-statements/introducing-conditional-statements-2

It correctly checks the first task, but when I add some code to pass the second task it displays the following message: "Oops! It looks like Task 1 is no longer passing.". However I only added an 'if' statement to the previous code.

The code I use for the second task is the following:

var answer = prompt("What is the best programming language?");

if (answer.toUpperCase() === 'JAVASCRIPT') {
  alert('You are correct');
}

The first line is the one I use in task 1, then I add the rest in task 2.

Thanks,

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Your code is functional. The problem is that you're going above and beyond what they're asking. You're actually validating the user's input regardless of what case they type in, which is actually a good thing! But... they didn't ask for that and now they can't evaluate your solution. What they're looking for is much more simple. Take a look:

var answer = prompt("What is the best programming language?");

if(answer === 'JavaScript') {
  alert("You are correct");
}

Thanks! The error message is a little misleading