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 trialSana Murad
3,859 PointsSee the correct alert message but the message says its wrong
I see the correct alert message "welcome student' but the message says " Bummer I dont see the message ' welcome Student" : It appears the message comes up before the alert box open .. what could be wrong in my code
var isAdmin = false;
var isStudent = true;
if (isAdmin) {
alert('Welcome Administrator');
} else if(isStudent) {
alert('Welcome Student');
}
<!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
Jason Anders
Treehouse Moderator 145,860 PointsHey Sana,
Challenges are very picky and specific. You're code is correct, except the challenge is asking for "Welcome student", where student has a Lower-Case "s".
Fix that up and you're good to go!
Keep Coding! :)
Sana Murad
3,859 PointsThanks so much! i was making a mistake with the caps .