Go code
func count(values ...int) int {
return len(values)
}
fmt.Println(count(4, 5, 6))Line-by-line explanation
...intcollects integer arguments into a slice.- Len returns the slice length.
- The call passes three arguments.
Expected output
3This is the expected result.