arrays initial example
This commit is contained in:
parent
0f087948a0
commit
ff632efdf9
10
arrays/arrays1.go
Normal file
10
arrays/arrays1.go
Normal file
|
@ -0,0 +1,10 @@
|
|||
package arrays
|
||||
|
||||
import "fmt"
|
||||
|
||||
func Demo1() {
|
||||
var numbers [5]int
|
||||
numbers[2]=50 // second index of the array
|
||||
fmt.Println(numbers)
|
||||
fmt.Println(numbers[2]) // will print second index of the array
|
||||
}
|
Loading…
Reference in New Issue
Block a user