# How can I use modulo operator (%) in JavaScript?

Advertisement

## How can I use modulo operator (%) in JavaScript?

### Question

How can I use modulo operator (%) in calculation of numbers for JavaScript projects?

2017/07/23

### Accepted Answer

It's the **remainder operator** and is used to get the remainder after integer division. Lots of languages have it. For example:

```
10 % 3 // = 1 ; because 3 * 3 gets you 9, and 10 - 9 is 1.
```

Apparently it is not the same as the modulo operator entirely.

2014/08/20

Read more... Read less...

That would be the modulo operator, which produces the remainder of the division of two numbers.

2013/05/12

Licensed under: CC-BY-SA with attribution

Not affiliated with: Stack Overflow

Email: [email protected]