Hi @cazzimoto! This works as expected, so well done! I do feel a little bit funny having the switch statement before the machineResult assignment, as surely it should check the machine is on first and deliver the result of that, before then checking the password. But given the way browsers handle conditionals, it works anyway
A minor nitpick is that in the instructions, it says " We’d like you to do this in a single line, using something that isn’t an if ... else structure."