> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sourcery.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Remove-Redundant-Slice-Index

#### Sourcery rule id: `remove-redundant-slice-index`

#### Description

Remove a redundant index from the array `.slice()` method.


#### Before

```javascript
const toEnd = numbers.slice(3, numbers.length)
```

#### After

```javascript
const toEnd = numbers.slice(3)
```



#### Explanation

Parameters in the array prototype `.slice(start, end)` method are optional, and by convention you should only use
the necessary ones, to simplify readability. The `end` is not necessary if you want to slice to the end of the
array. The `start` is additionally not necessary if you want to slice from the start of the array.
