Created
June 24, 2019 08:36
-
-
Save victorsteven/83729d4e89160530d6df8fa9f2a27599 to your computer and use it in GitHub Desktop.
This file contains hidden or 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" | |
| //Package scope array definition | |
| var integerArray [5]int | |
| var stringArray [4]string | |
| func main() { | |
| integerArray[0] = 10 | |
| integerArray[1] = 20 | |
| integerArray[2] = 30 | |
| integerArray[3] = 40 | |
| integerArray[4] = 50 | |
| fmt.Println("This is the integer Array: ", integerArray) | |
| stringArray[0] = "first" | |
| stringArray[1] = "second" | |
| stringArray[2] = "third" | |
| stringArray[3] = "fourth" | |
| fmt.Println("This is the string array: ", stringArray) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment