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 trialSean Ratner
10,405 Pointsadd conditional statement
Im currently trying to pass this test and it's appearing that no matter what i add to the test it just tells me "Oops it looks like task 1 is no longer passing" (Refering to just the var)
var answer = prompt('What is the best programming language?');
if (answer === 'Javascript') {
alert('You are correct');
} else {
alert('You are incorrect');
<!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
paulscanlon
Courses Plus Student 26,735 PointsHey
So close!
You didn't close off your else statement
Happy coding
Paul
Sean Ratner
10,405 PointsSean Ratner
10,405 PointsThank you! I skipped to the next section which also requires a conditional statement and realized this, though it was giving me a different. This problem specifically stating task 1 no longer completed is what was throwing me off, and making me think it was a different issue.