0
SWITCH STATEMENT
What is the output of this code? var x = 3; switch (x) { case 1: document.write(x); break; case 2: document.write(x+2); break; default: document.write(x+5); } Check Back
5 Answers
+ 3
8 because there is no matching case and hence the default case gets executed.
0
THANK YOU BHAIYA . i was getting a little confuse .
0
0
8
0
but how is it 8 and not 7 or 3 or 10 ?