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 trialKathleen OKeife
1,960 PointsWhat is wrong with this code?
I do not understand how to change else if message
const isAdmin = false;
const isStudent = true;
let message;
if ( isAdmin ) {
message = 'Welcome admin';
} else if ( isStudent ) {
message = "Welcome student";
}else () {
}
Kathleen OKeife
1,960 PointsI figured it out. I removed () from the last else and it ran. I was able to complete the whole challenge. Thanks for the help!
1 Answer
Steven Parker
231,268 PointsYou actually have the right code, but then after it there's more code that is not asked for in the instructions. The final "else" and what follows it should not be there.
Xavier Ritch
11,099 PointsXavier Ritch
11,099 PointsHey it seems you completed the code for the challenge just fine, however, i believe the additional 'else' clause that you added may be unnecessary and that may be whats stopping you from going forward here. Try removing that empty else statement and I believe it will work