1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-09 17:44:56 +09:00
ladybird/Libraries/LibJS/Tests/switch-basic.js
Andreas Kling 2285f84596 LibJS: Implement basic execution of "switch" statements
The "break" keyword now unwinds to the nearest ScopeType::Breakable.
There's no support for break labels yet, but we'll get there too.
2020-03-29 15:03:58 +02:00

10 lines
98 B
JavaScript

switch (1 + 2) {
case 3:
console.log("PASS");
break;
case 5:
case 1:
break;
default:
break;
}