Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
Go
/
Go
A function appends to a slice. Which rule keeps the result correct whether or not a new b…
from Go
beginner
1 min
A function appends to a slice. Which rule keeps the result correct whether or not a new backing array is allocated?
Always retain the slice value returned by `append`.
Ignore the return value when the original slice has spare capacity.
Take the address of the first element before every append.
Check
Ask AI about this kata
Report an error
next kata
Which statement about deferred calls is correct?
Quiz
A new version is available
Reload