---
meta:
  title: Remainder
  description: The remainder operator divides the left number by the right number and returns the amount that is left over. The remainder always takes the sign of the left operand.
---

The remainder operator divides the left number by the right number and
returns the amount that is left over. The remainder always takes the
sign of the left operand.

```javascript
console.log(2 % 2); // 0
console.log(2 % -2); // 0
console.log(-2 % 2); // -2
console.log(-2 % -2); // 0
```
