# XO0542: an operator after a `??` default

`??` binds loosest of the binary operators (core 15), so `m.get(w) ?? 0 + 1` adds 1 to the default only: a key that is present gives its count unchanged and a missing one gives 1. `xo vet` reports a literal default followed by a tighter operator. Parenthesize what was meant: `(m.get(w) ?? 0) + 1`, or `m.get(w) ?? (0 + 1)` when the sum was the default.

## Example

```xo
let n = counts.get(w) ?? 0 + 1
```

## Fix

```xo
let n = (counts.get(w) ?? 0) + 1
```

Run `xo explain XO0542` for this text in a terminal, or see
[section 10.6 of the specification](../../spec/core/#106-diagnostic-codes).

