Complete the keyword that exposes index and value for a slice.
for index, value := ___ values {
fmt.Println(index, value)
}Answer & explanation
Answer: range
The `range` clause yields the index and element for a slice.
Practice iteration with self-contained questions. Check your answer, then use the explanation to understand the reasoning.
for index, value := ___ values {
fmt.Println(index, value)
}Answer: range
The `range` clause yields the index and element for a slice.