2012-09-23 12:11:48 -04:00

17 lines
234 B
Go

// ## Mutation
package main
import "fmt"
func main() {
var x string
x = "old"
fmt.Println(x)
// You can mutate variables in Go by re-assigning the
// variable to a new value.
x = "new"
fmt.Println(x)
}