Multiple choice technology web technology

var mode = 1; switch (mode){ case 1: document.write('Mode value is 1'); case 2: document.write('Mode value is 2'); case 3: document.write('Mode value is 3'); }

  1. Mode value is 1Mode value is 2Mode value is 3

  2. Mode value is 1

  3. JavaScript error in the browser

  4. None of the above

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

This switch statement lacks break statements, so it exhibits fall-through behavior. Once mode matches case 1, execution continues through case 2 and case 3, printing all three messages. Without break statements, every case after the matching one executes.