Skip to content

Commit 749521f

Browse files
authored
Update solution.md
1 parent 020231d commit 749521f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • 1-js/02-first-steps/13-switch/2-rewrite-if-switch

1-js/02-first-steps/13-switch/2-rewrite-if-switch/solution.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
前两个 `case` 分别执行各自的代码,第三个 `case` 会和下一个 `case` 一起执行
1+
前两个检查为前两个 `case`,第三个检查分为两种情况
22

33
```js run
44
let a = +prompt('a?', '');
@@ -23,5 +23,5 @@ switch (a) {
2323

2424
请注意:最后的 `break` 不是必须的。但是为了让代码可扩展我们要把它加上。
2525

26-
有可能之后我们想要再添加一个 `case`,例如 `case 4`。如果我们忘记在它之前添加一个 break,那么在 case 3 结束时会出现错误。所以这是一种保险
26+
有可能之后我们想要再添加一个 `case`,例如 `case 4`。如果我们忘记在它之前添加一个 break,那么在 case 3 执行结束后可能会出现错误。所以这是一种自我保险
2727

0 commit comments

Comments
 (0)