gokursu/arrays/arrays.go

10 lines
199 B
Go
Raw Normal View History

2024-01-07 21:09:10 +03:00
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
}