Assessment wanted for Conditionals 1, 2, 3 and 4 skill tests

Assessment wanted for Conditionals 1, Conditionals 2, Conditionals 3 and Conditionals 4 skill tests

Congratulations @church_craig!

Your code is correct. I still have two remarks:

  • Task 3: In the switch condition I would rather use the value true instead of a variable that happens to be true there.
  • Task 4: You could move pwdResult = to the front in order to not write it twice:
    pwdResult = pwd === 'cheese' ? 'Login successful.' : 'Password incorrect; login failed.'
    
    This works because the ternary operator has higher precedence (priority) than the assignment and it evaluates to one or the other string.

See you,
Michael