shad-go/lectures/01-basics/scope/scope.go

12 lines
165 B
Go
Raw Normal View History

2020-02-20 14:40:51 +00:00
package main
import "fmt"
func main() {
x := "hello"
for _, x := range x {
x := x + 'A' - 'a'
fmt.Printf("%c", x) // "HELLO" (one letter per iteration)
}
}