diff --git a/src/03-variables.go b/src/03-variables.go new file mode 100644 index 0000000..9f98f90 --- /dev/null +++ b/src/03-variables.go @@ -0,0 +1,26 @@ +package main + +import "fmt" + +func main() { + var a = "initial" + fmt.Println(a) + + a = "changed" + fmt.Println(a) + + var b, c int = 1, 2 + fmt.Println("b=", b, ", c=", c) + + var d = true + fmt.Println(d) + + var e int + fmt.Println(e) + + f := "short" + fmt.Println(f) + + f = "changed short" + fmt.Println(f) +}