Created
May 1, 2020 12:14
-
-
Save john-nash-rs/dd33bccda286c2f9286de46512e73097 to your computer and use it in GitHub Desktop.
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
func main() { | |
var a [3]int = [3]int{1,2,3} | |
fmt.Println("Element at index is",a[1]) | |
fmt.Println("Length of array is",len(a)) | |
for i, v := range(a){ | |
fmt.Printf("Index is %d, and value is %d \n",i,v) | |
} | |
q := [...]int{1, 2, 3} | |
fmt.Println("Length of array is",len(q)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment