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...


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?"


"Are you human?"


b)"How do you not know?"



c)"Are you human?"



d)None of the above



Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here