Javascript:Observe the following switch statement closely:
switch (prompt("What is your mood today?")) { case "happy!": console.log("Yay!"); break; case "Sad".toLowerCase(): console.log("Don't be sad..."); case "upset": console.log("Get glad!"); break;case "UNKNOWN":console.log("How do you not know?"); default: console.log("Are you human?"); break; }
1) If input is "happy!", then output is:
a)"Yay!"
b)"How do you not know?""Are you human?"
c)"Are you not human?"
d)"Get glad!"
2) If input is "Sad", then output is:
a)"Get glad!"
b)"Don't be sad..."
"Get glad!"
c)"Are you human?"
d)None of the above
3) If the input is "UNKNOWN", then the output is:
a)"How do you not know?"
b)"How do you not know?"
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here