> ## 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-Unreachable-Code

#### Sourcery rule id: `remove-unreachable-code`

#### Description

Remove unreachable code.


#### Before

```javascript
if (true) {
  return;
  do_something();
}
```

#### After

```javascript
if (true) {
  return;
}
```



#### Explanation

Statements after a `return`, `break`, `continue` or `throw` will never be executed.
Leaving them in the code confuses the reader, who may believe that these
statements have some effect. They should therefore be removed.
