All challenges
Multiple ChoiceIntermediate 30s

Go: Slice Capacity

When appending beyond capacity, Go:
Options
  1. 1Panics with a runtime out-of-range error
  2. 2Allocates a new larger underlying array
  3. 3Returns an error the caller must check
  4. 4Truncates the slice, dropping newest items

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle