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 trialKim Dallas
11,461 Pointsthis is exactly what he's asked to write.
the instructor said that you must have the document.write command to give the message that you are correct?
var answer= prompt("what is the best programming language?");
if (answer==="Javascript" {
"You are correct"); }
<!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
Kim Dallas
11,461 Pointsthank you otec.
Adam Beer
11,314 PointsNo! You forget the closing bracket of if() statement. And you forget the alert() dialog. Until your problem isn't resolve, please use one topic/question.
Kim Dallas
11,461 Pointsit is adam. the first line works fine. then it asks to do a conditional statement saying it's JavaScript. You are correct. I'm following his exact example. but it's not working
Adam Beer
11,314 PointsOkey, but where are your alert() dialog?
Otec Perez Glass
7,678 PointsThere you go include the the string inside the the conditional like this
alert( "You are correct" ); // hopefully that will help you.