EXAMRADAR

Question: What will be the result of the following `switch` statement?<pre><code>var day = "Monday";</code><code>switch (day) {</code><code>case "Monday".console.log("It's the start of the week.");</code><code>break;</code><code>case "Friday".console.log("It's the end of the week.");</code><code>break;</code><code>default. console.log("It's a regular day.");</code><code>}</code></pre>

Answer:

The `switch` statement matches the `day` variable with the "Monday" case and logs "It's the start of the week."

MCQ: What will be the result of the following `switch` statement?<pre><code>var day = "Monday";</code><code>switch (day) {</code><code>case "Monday".console.log("It's the start of the week.");</code><code>break;</code><code>case "Friday".console.log("It's the end of the week.");</code><code>break;</code><code>default. console.log("It's a regular day.");</code><code>}</code></pre>

Correct Answer: A. "It's the start of the week." will be logged

Explanation:

The `switch` statement matches the `day` variable with the "Monday" case and logs "It's the start of the week."

Discuss a Question

Related Questions

You may be interested in:

Web Fundamental MCQs

Recently Added Articles

AI vs Machine Learning: Key Differences Every Professional Should Know

Last updated on: February 13, 2026Posted by: ExamRadar

Office Cleaning Services That Elevate Sydney Offices

Last updated on: February 11, 2026Posted by: ExamRadar

Mental Health Support That’s Closer Than You Think

Mental Health Support That’s Closer Than You Think

Last updated on: January 7, 2026Posted by: ExamRadar

Columbus roofing company

Transform Your Home’s Exterior with Columbus roofing company

Last updated on: November 27, 2025Posted by: ExamRadar

What to Ask Before Booking TMS Therapy Near Me

Last updated on: November 7, 2025Posted by: ExamRadar

5 Trading Strategies to Minimize Risk

Last updated on: October 18, 2025Posted by: ExamRadar