devendramu
Results
2
comments of
devendramu
The slice is created with length 3 (index 0,1 and 2). so accessing index 3 gives error. The capacity is still 5. You may extend the slice first and then...
If slice reaches the capacity, you can still append element. Once capacity is reached, Internally append create a new bigger size array and slice starts referencing to new one