mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-11-23 22:27:35 +03:00
Merge pull request #2272 from Subzidion/master
[go/en] Updated variable references
This commit is contained in:
commit
1e05147e2f
@ -221,7 +221,8 @@ func learnFlowControl() {
|
||||
xBig := func() bool {
|
||||
return x > 10000 // References x declared above switch statement.
|
||||
}
|
||||
fmt.Println("xBig:", xBig()) // true (we last assigned e^10 to x).
|
||||
x = 99999
|
||||
fmt.Println("xBig:", xBig()) // true
|
||||
x = 1.3e3 // This makes x == 1300
|
||||
fmt.Println("xBig:", xBig()) // false now.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user