fixes
This commit is contained in:
parent
c9401b3104
commit
0fcf9f84fa
58 changed files with 673 additions and 643 deletions
|
@ -1,4 +1,4 @@
|
|||
The first two checks are a usual `case`. The third one is split into two cases:
|
||||
The first two checks turn into two `case`. The third check is split into two cases:
|
||||
|
||||
```js run
|
||||
let a = +prompt('a?', '');
|
||||
|
@ -24,4 +24,3 @@ switch (a) {
|
|||
Please note: the `break` at the bottom is not required. But we put it to make the code future-proof.
|
||||
|
||||
In the future, there is a chance that we'd want to add one more `case`, for example `case 4`. And if we forget to add a break before it, at the end of `case 3`, there will be an error. So that's a kind of self-insurance.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue