Hey there @djkamar411! You’ll be pleased to know that you have got this VERY nearly right. The only issue was that the ternary operator line was not quite there:
- The test inside the line needs to use the equality operator, not the assignment operator (this is a really common mistake, so don’t let it worry you).
-
pwdResult
is already declared, so you don’t need the let
keyword on the front. In fact, this’ll give you an error, because you can’t redeclare let
variables.
The updated line looks like this:
pwdResult = (pwd === 'cheese') ? 'You have successfully logged in.' : 'You have not logged in successfully.';
But great work on the whole; you were so close!
Thanks so much! Will keep the equality operator in mind.