PRACTICE / UNDERSTAND / REPEAT

Go: Slices

Practice slices with self-contained questions. Check your answer, then use the explanation to understand the reasoning.

15 questionsAnswers explainedFree · no login
Question 1 of 15
Slices · MCQQuestion link ↗

Which built-in function appends an element to a slice?

Choose one answer
Answer & explanation

Answer: append

`append(slice, value)` returns the updated slice and may allocate a larger backing array.