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 trialKevin Enloe
12,438 PointsJS Basics not recognizing correct code on code review quiz
I am having problems with the system letting me answer a question in a quiz. I am almost 100% sure that what I have entered is correct because the page is actually running it as it is supposed to, but the code check is not recognizing that it is correct.
Where I was at: JS basics - making decisions with conditional statements - add an else if clause
Code that was entered:
var isAdmin = false;
var isStudent = true;
if ( isAdmin ) {
alert('Welcome administrator')
} else if ( isStudent ) {
alert('Welcome Student');
}
Can someone please help me with this?
1 Answer
Erik Nuber
20,629 PointsI know this is going to sound insane but, the code is fine however you have to have a small 's' on 'student' the quizzes are very particular
var isAdmin = false;
var isStudent = true;
if ( isAdmin ) {
alert('Welcome administrator')
} else if (isStudent) {
alert('Welcome student');
}