Write the code below to create and initialize an int slice mySlice using the make function with len=8 and cap=12.
Slices
Length and capacity
Report a typo
Write a program in Go
package main
import "fmt"
// nolint: gomnd // DO NOT remove this comment!
func main() {
// Use the `make` function to create `mySlice` with len=8 and cap=12 below:
mySlice := ?
fmt.Println(checkSlice(mySlice)) // DO NOT delete this line! it checks the slice len and cap.
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.