12
zh/02.3.md
12
zh/02.3.md
@@ -149,22 +149,22 @@ Go里面最强大的一个控制逻辑就是`for`,它即可以用来循环读
|
||||
|
||||
integer := 6
|
||||
switch integer {
|
||||
case 4:
|
||||
case 4:
|
||||
fmt.Println("The integer was <= 4")
|
||||
fallthrough
|
||||
case 5:
|
||||
case 5:
|
||||
fmt.Println("The integer was <= 5")
|
||||
fallthrough
|
||||
case 6:
|
||||
case 6:
|
||||
fmt.Println("The integer was <= 6")
|
||||
fallthrough
|
||||
case 7:
|
||||
case 7:
|
||||
fmt.Println("The integer was <= 7")
|
||||
fallthrough
|
||||
case 8:
|
||||
case 8:
|
||||
fmt.Println("The integer was <= 8")
|
||||
fallthrough
|
||||
default:
|
||||
default:
|
||||
fmt.Println("default case")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user