# Source: https://github.com/quick-lint/quick-lint-js/blob/master/docs/errors/E0064.md

# E0064: missing body for 'if' statement

```config-for-examples
{
  "globals": {
    "AssertionError": true,
    "rose": true,
    "sugar": true,
    "violet": true
  }
}
```

`if` statements require a body, which must be a statement or `{` `}` surrounding
a list of statements. It is a syntax error to omit the body of an `if`
statement:

```javascript
function assert(condition) {
  if (!condition)
}

if (rose.color === 'red' &&
    violet.color === 'blue')
```

To fix this error, write the body of the `if` statement:

```javascript
function assert(condition) {
  if (!condition)
    throw new AssertionError();
}

if (rose.color === 'red' &&
    violet.color === 'blue') {
  sugar.flavor = 'sweet';
}
```

Introduced in quick-lint-js version 0.2.0.