Performance
Sliceoperations are cheap!Slicing: Creates a newslice header.Assigning a Slice to another Sliceor,passing it to a function: Only copies theslice header.Slice header has a fixed sizeandit doesn't changeeven if we have got millions of elements.Arraycan be expensive as compared toSlice.Assigning an array to another arrayorpassing it to a function: Copies all the elements of it.