how to initialize a slice in go
package main
import "fmt"
func main() {
// Step 1: Declare a slice variable
var mySlice []int
// Step 2: Use make() function to initialize the slice with a specific length and capacity
mySlice = make([]int, 3, 5)
// Step 3: Initialize the elements of the slice
mySlice[0] = 1
mySlice[1] = 2
mySlice[2] = 3
// Step 4: Print the initialized slice
fmt.Println("Initialized Slice:", mySlice)
}