Go variables
In Go, variables are explicitly declared and used by the compiler to e.g. check type-correctness of function calls.
package main
import "fmt"
func main() {
var a = "variable"
fmt.Println(a)
}
go run variables.go
variable
In Go, variables are explicitly declared and used by the compiler to e.g. check type-correctness of function calls.
package main
import "fmt"
func main() {
var a = "variable"
fmt.Println(a)
}
go run variables.go
variable