1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-17 09:45:06 +00:00
serenity/Libraries/LibJS/Tests/switch-basic-2.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
115 B
JavaScript

var a = "foo";
switch (a + "bar") {
case 1:
break;
case "foobar":
case 2:
console.log("PASS");
break;
}