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

I changed it but its still sticking

I think there could be something wrong with the checker? nothing is working

app.js
var answer= prompt("what is the best programming language?")
if answer === "Javascript"; {
  document.write <p> ("You are correct."); </p>)
    }
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>

3 Answers

Adam Beer
Adam Beer
11,314 Points

Just a few typo. You forget use the brackets of if() statement. Delete your semicolon after the "JavaScript". And again, I wrote to you, you shouldn't use document.write(), you want to use the alert() dialog. And you shouldn't use the <p></p> elements. Please focus on the questions. Just do what the task asks from you and don't do nothing else.

I will adam. thank you. right now i'm going against time to get the rest of the prerequisites for code Louisville to be considered. this is my first attempt at programming with these languages. most of everything i've done before were building databases with FoxPro. I really appreciate all the help.

Adam Beer
Adam Beer
11,314 Points

If you do not know the answer use the forum and we help you. Please focus on the questions. If you do anything else you will not let go the task.

Now you found the right way?

var answer = prompt("what is the best programming language?")οΌ› if (answer === "Javascript"οΌ‰{ document.write("<p>You are correct.</p>") }

Try this.

Adam Beer
Adam Beer
11,314 Points

First, this isn't the right way. Second, we don't write the good code. No one learns from the finished code.

Really? It should work. What do you want to do ?