Video:

Variables in Go

May 7, 2021

Course Instructor: Elliot Forbes

Hey Gophers! My name is Elliot and I'm the creator of TutorialEdge and I've been working with Go systems for roughly 5 years now. Feel free to reach out to me on twitter - @Elliot_F

Code

package main

func main() {
	var welcome string = "hello world"
	// welcome := "hello world"
	println(welcome)

	var myAge int = 27
	// myAge := 27
	myAge -= 10

	println(myAge)

}

Running Our Code

$ go run main.go
hello world
17