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 trialGabriel Kieruzel
Courses Plus Student 19,655 PointsHello, When adding else statement and checking I'm receiving: Oops! It looks like Task 1 is no longer passing.
I went through 2 of tasks in this challenge. At task 3 adding else statement (quite easy) I'm receiving following message:
Oops! It looks like Task 1 is no longer passing.
No idea how as task 1 was cempleted.
var answer = prompt('what is the best programming language?');
if (answer === "JavaScript") {
document.alert('You are correct');
} else {
document.alert('JavaScript is the best language!');
}
<!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>
2 Answers
Nejc Vukovic
Full Stack JavaScript Techdegree Graduate 51,574 PointsHi,
Have you tried: change your 2 alerts to only : alert("Text");
Gabriel Kieruzel
Courses Plus Student 19,655 PointsHi,
sorry for bit late but I would like to thank you. This suggestion helped me to move forwards. Indeed using short version 'alert("text");' allows me to pass the step.
Many thanks