mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 01:21:38 +08:00
add 04.4.md translate for ch 4.4
This commit is contained in:
12
eBook/examples/chapter_4/local_scope.go
Normal file
12
eBook/examples/chapter_4/local_scope.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package main
|
||||
var a = "G"
|
||||
func main() {
|
||||
n()
|
||||
m()
|
||||
n()
|
||||
}
|
||||
func n() { print(a) }
|
||||
func m() {
|
||||
a := "O"
|
||||
print(a)
|
||||
}
|
Reference in New Issue
Block a user