# &= operator

Source: https://ref.dm-lang.org/operator/ampequals

### Format
> `A &= B`

Set A equal to A & B. It is shorthand for A = A & B.

This is commonly used to turn off certain bitfields in a word.

```dm
usr.sight &= ~BLIND // turn off the blind bit
```

If A and B are lists, items in A that are not in B are removed.

If A is an /icon or /matrix datum, the datum will be changed rather than creating a new one and re-assigning it to A.

### See also
- [& operator](https://ref.dm-lang.org/operator/amp/index.md)
- [operators](https://ref.dm-lang.org/operator/index.md)
- [|= operator](https://ref.dm-lang.org/operator/vertequals.md)
