Created
June 27, 2020 02:19
-
-
Save prondubuisi/bc8800f4e2b892404456335f109ea7e2 to your computer and use it in GitHub Desktop.
Variable Declaration in Go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
var message string = "Hello" | |
var num1, num2 int = 1, 2 | |
var a = "initial" | |
var average float32 | |
func main() { | |
print(average) | |
average = 6.4 | |
isValid := true | |
fmt.Println(message, num1, num2, average) | |
fmt.Println(a) | |
fmt.Println(isValid) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment