Back to tasksGet help with live coding in real time with Sobes Copilot
Junior — Senior
276
Как ограничение capacity влияет на результат функции append
Task condition
Определите, какое значение будет напечатано программой при её выполнении.
func main() {
fruit := make([]string, 5)
fruit[0] = "banana"
fruit[1] = "cucumber"
fruit[2] = "grape"
fruit[3] = "watermelon"
fruit[4] = "pineapple"
xs := fruit[1:3:3]
xs[0] = "apple"
xs = append(xs, "mango")
fmt.Println(fruit)
}