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 trialJure Jakomin
2,950 PointsDying again. Please help
Checked this against esprima, syntax validator and it says it's all good. Semicolon in, semicolon out, window.alert, " not ' ...I've tried everything and checked against the videos 15x. It always says: Hmm, I don't see the "Who are you" message...
I can see it. It pops up.
Please help, this is very annoying.
var isAdmin = false; var isStudent = false;
if ( isAdmin ) { alert('Welcome administrator'); } else if (isStudent) { alert('Welcome student'); } else { alert('Who are you') }
var isAdmin = false;
var isStudent = false;
if ( isAdmin ) {
alert('Welcome administrator');
} else if (isStudent) {
alert('Welcome student');
} else {
alert('Who are you')
}
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JavaScript Basics</title>
</head>
<body>
<script src="script.js"></script>
</body>
</html>
2 Answers
Jake Milburn
13,608 PointsThese challenges are really fussy about following the instructions exactly. I am pretty sure all you have done is missed the question mark at the end of the string and also a semi colon at the end of the line.
Jure Jakomin
2,950 PointsThank you!
Dave Harker
Courses Plus Student 15,510 PointsDave Harker
Courses Plus Student 15,510 PointsYeah I've noticed that ... if unspecified you can pretty much solve it how you like, but if they list a requirement you had better nail it word for word.
Even so ... I'm really enjoying it, and since I've realised that aspect of the challenges I don't get caught out as often anymore :)
Have fun,
Dave.