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 trialKara Myers
2,036 PointsCreate a conditional statement that tests if the isAdmin variable is true.
Create a conditional statement that tests if the isAdmin variable is true. If it's true, set the value of the message va
const isAdmin = true;
const isStudent = false;
let message;
if ( isAdmin === true) {
message = 'Hi!';
}
1 Answer
John Johnson
11,790 PointsI'm not sure what your question is.
The JavaScript you've posted here is valid. If you're having problems progressing past this question, make sure you type the message exactly as the question phrases it.
ex. Here you've put message = 'Hi!' whereas the question is asking you to set the message to "Welcome admin"