CJCoding With Joseph
15free / daySign inCreate account
Back to Code Walkthrough

Switch Statement Fall-Through

JavaScript code walkthrough · Question 21
mediumSwitch

Code

Read carefully. What does this print?
1let x = 2;
2switch (x) {
3 case 1:
4 console.log("one");
5 case 2:
6 console.log("two");
7 case 3:
8 console.log("three");
9 break;
10 case 4:
11 console.log("four");
12}

Your answer