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

# E0080: missing name of class

If a statement begins with the `class` keyword, the declared class must have a
name. It is a syntax error to start a statement with `class` but not give a name
to the class:

```javascript
class {
  speak() {
    console.log('woof!');
  }
}
```

To fix this error, write the name of the class after the `class` keyword:

```javascript
class Doggie {
  speak() {
    console.log('woof!');
  }
}
```

Alternatively, declare a variable and initialize it with the class:

```javascript
const Doggie = class {
  speak() {
    console.log('woof!');
  }
};
```

Introduced in quick-lint-js version 0.2.0.