Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

malcolm mowlam
3,856 Pointschallenge task 1 of 1 conditional statements
can any one please give me a hint
const isAdmin = true;
const isStudent = false;
If (is admin){
let message= "Welcome admin";
}
2 Answers

Daniel Jong
11,070 PointsHi, replay the video to see how Guil did it. 'if' is a syntax, you can't just change the i to uppercase and spread the camel cased isAdmin to is admin.
Here's my solution for this challenge:
const isAdmin = true;
const isStudent = false;
let message;
if (isAdmin){
message= "Welcome admin";
}
Hope it helps!

Justin Stewart
1,298 PointsI know this is an older post but I was hoping this may help someone out. Actually took me a bit to figure this answer out. I had the correct "if" statement but they also want you to add the "else" statement.
const isAdmin = true;
const isStudent = false;
let message;
if (isAdmin) {
message = "Welcome admin";
}else {
isAdmin = isStudent;
}
Marcin Lipski
9,947 PointsMarcin Lipski
9,947 PointsHello Malcolm "if" should be non capitalized and "isAdmin" in brackets should be a one word with capital "A".
I hope this helps