Multiple choice technology web technology

var d=new Date(); theDay=d.getDay(); switch (theDay) { case 2: document.write("Today is Saturday"); break; case 4: document.write("Finally Friday"); break; case 5: document.write("Super Saturday"); break; case 6: document.write("Sleepy Sunday"); default: document.write("I'm looking forward to this weekend!"); } If today is Saturday, what will be out of the above snippet

  1. Super Saturday

  2. Finally Friday

  3. Sleepy Sunday I'm looking forward to this weekend!

  4. Sleepy Sunday

  5. Today is Saturday

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In JavaScript, Date.prototype.getDay() returns 6 for Saturday. In the switch block, case 6 matches, printing 'Sleepy Sunday'. Because there is no break statement after case 6, execution falls through to the default block, which prints "I'm looking forward to this weekend!".