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 trialDavid Dehghani
6,992 PointsIf/else statement help!
Help! Treehouse is saying that my alert message is not popping up, but it is for me every time I recheck the work. Am I missing something?
var isAdmin = false;
var isStudent = true;
if ( isAdmin ) {
alert('Welcome administrator')
}
else if (isStudent === true) {
alert('Welcome Student')
}
else {
}
<!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>
1 Answer
Teja Tummalapalli
5,592 PointsIn the word Student , s is small letter. Try changing to students.
Jason Anders
Treehouse Moderator 145,860 PointsJason Anders
Treehouse Moderator 145,860 PointsModerator Edit: Changed response from a Comment to the Answer section.
Yes, Teja is correct. You need to change "Student" to a lower-case "s" (but keep it singular). Challenges are very picky and very strict even with spelling, punctuation, and capitalization.
Keep Coding!
David Dehghani
6,992 PointsDavid Dehghani
6,992 PointsThank you! I feel better knowing the code is essentially right but I keep overlooking small details like capitalization.