Introduction
This challenge will test your understanding of arrays in Golang. You will be required to create and manipulate arrays of different types.
This challenge will test your understanding of arrays in Golang. You will be required to create and manipulate arrays of different types.
You are required to create an array of integers with a length of 5. You will then set a value at a specific index and retrieve a value from a specific index. You will also be required to find the length of the array and declare and initialize an array in one line. Finally, you will create a two-dimensional array and initialize it with values.
## Note that arrays appear in the form `[v1 v2 v3 ...]`
## when printed with `fmt.Println`.
$ go run arrays.go
emp: [0 0 0 0 0]
set: [0 0 0 0 100]
get: 100
len: 5
dcl: [1 2 3 4 5]
2d: [[0 1 2] [1 2 3]]
In this challenge, you learned how to create and manipulate arrays in Golang. You learned how to set and retrieve values from specific indices, find the length of an array, declare and initialize an array in one line, and create a two-dimensional array and initialize it with values.