Merge pull request #2272 from Subzidion/master

[go/en] Updated variable references
This commit is contained in:
Adam Bard 2016-06-07 21:30:27 -07:00
commit 1e05147e2f

View File

@ -221,7 +221,8 @@ func learnFlowControl() {
xBig := func() bool { xBig := func() bool {
return x > 10000 // References x declared above switch statement. 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 x = 1.3e3 // This makes x == 1300
fmt.Println("xBig:", xBig()) // false now. fmt.Println("xBig:", xBig()) // false now.