Given an array of colors, `a.slice(3)` retrieves the element at index 3. `slice` is another name for the array’s `[]` retrieval method: use whichever reads more clearly where you need an element. section 9.2.2
The argument determines what comes back:
- `a.slice(3)` retrieves one element. section 9.2.2
- `a.slice(3, 2)` starts at index 3 and retrieves two elements in a new array. section 9.2.2
- `a.slice(3..5)` retrieves the elements selected by the range, also in an array. section 9.2.2
A contiguous group
For `a = %w(red orange yellow purple gray indigo violet)`, `a.slice(3, 2)` returns `["purple", "gray"]`. The `3` is the starting index; the `2` is a length, not an ending index. section 9.2.2
Use `slice!` when the selected items should be removed from the array. For other retrieval jobs, `values_at` accepts multiple individual indexes, while `dig` follows indexes into nested arrays. Strings also have a `slice` method, but its arguments can specify substrings in additional ways. section 9.2.2 section 8.1.2

