2 ms·
``` switch (true) { case 1 + 1 === 2: // This case evaluates to true so it will be executed default: // This will not be executed } ``` This is wrong,
by 8128js8121 5y ago
```
switch (true) {
case 1 + 1 === 2:
// This case evaluates to true so it will be executed
default:
// This will not be executed
}
```
This is wrong, Since there is no return or break default will also be executed.