methods of collection 'slice' and 'indexOf'