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.

Answer from MarioDS on Stack Overflow
Discussions

char - How can I use modulo operator (%) in JavaScript? - Stack Overflow
How can I use modulo operator (%) ... for JavaScript projects? ... Someone might want to rename this question from modulo to remainder because it pops up in Google searches for a modulo operator in JS. ... It's the remainder operator and is used to get the remainder after integer division... More on stackoverflow.com
๐ŸŒ stackoverflow.com
Understanding the JavaScript Modulo Operator
A quick peek at the documentation would reveal that % in JavaScript is not modulo, it's the remainder operator (or can be found in the ECMAScript specification ). This is confusing to many people, and unfortunately articles like these don't help by using the wrong terminology. The difference occurs when one of the values is negative. -21 % 4 The result of this is 3 for "mod" and -1 for "rem". This can be confusing behavior, if for example, to implement an isOdd function, you might think of something like this: function isOdd(n) { return n % 2 === 1 } However, this is wrong! It returns false for an input of -1. More on reddit.com
๐ŸŒ r/programming
9
0
December 12, 2023
math - How to perform an integer division, and separately get the remainder, in JavaScript - Stack Overflow
1. If you're going to compute the remainder rem anyway, you can get the quotient div faster without flooring: (y - rem) / x. 2. By the way the modulo operation by Donald Knuth's recommended definition (sign-matches-divisor, not the remainder i.e. Euclidean modulus, nor the JavaScript ... More on stackoverflow.com
๐ŸŒ stackoverflow.com
Why do different programming languages have a different definition for Modulus operation?
Of course it will not be standardized, because changing how the mod works would break millions of existing programs. The "why" is difficult. Maybe some used the definition that would make the implementation faster with the available processors, or the one more coherent from a nathematical point of view. In practice, most of times you use positive operands. I've programmed as an amateur for decads before encountering a negative operand (last week), so knowing it was tricky, I checked it. More on reddit.com
๐ŸŒ r/math
52
104
June 18, 2019
๐ŸŒ
Quora
quora.com โ€บ What-is-the-purpose-of-a-modulo-operator-in-JavaScript-MCQ
What is the purpose of a modulo operator in JavaScript MCQ? - Quora
Answer: #0810 - COMP SCI - WHAT IS MODULO OPERATOR % Letโ€™s do it! The modulo operator % is the same in all computer languages: The modulo operator is useful in several practical programming circumstances. Example 1. Find all even numbers between A and B If A and B were even numbers (for exam...
๐ŸŒ
Better Programming
betterprogramming.pub โ€บ what-does-the-percent-sign-mean-in-javascript-dd442822596
What Does the Percent Sign Mean in JavaScript?
January 22, 2020 - JavaScript has many operators. One of them is the percent sign: %. It has a special meaning in JavaScript: itโ€™s the remainder operator. It obtains the remainder between two numbers. This is different from languages like Java, where % is the modulo operator.
๐ŸŒ
DigitalOcean
digitalocean.com โ€บ community โ€บ tutorials โ€บ how-to-do-math-in-javascript-with-operators
How To Do Math in JavaScript with Operators | DigitalOcean
August 25, 2021 - Division is particularly useful ... that is slightly less familiar is the modulo (sometimes known as modulus) operator, which calculates the remainder of a quotient after division....
Find elsewhere
๐ŸŒ
MDN Web Docs
developer.mozilla.org โ€บ en-US โ€บ docs โ€บ Web โ€บ JavaScript โ€บ Reference โ€บ Operators โ€บ Remainder
Remainder (%) - JavaScript | MDN
For two values of the same sign, ... which can make them differ by one unit of d. To obtain a modulo in JavaScript, in place of n % d, use ((n % d) + d) % d....
๐ŸŒ
freeCodeCamp
freecodecamp.org โ€บ news โ€บ javascript-modulo-operator-how-to-use-the-modulus-in-js
JavaScript Modulo Operator โ€“ How to Use the Modulus in JS
November 7, 2024 - The modulo operator in JavaScript, also known as the remainder operator, is used to find the remainder after dividing one number by another.
๐ŸŒ
W3Schools
w3schools.com โ€บ js โ€บ js_arithmetic.asp
JavaScript Arithmetic
In arithmetic, the division of two integers produces a quotient and a remainder. In mathematics, the result of a modulo operation is the remainder of an arithmetic division.
๐ŸŒ
Codedamn
codedamn.com โ€บ news โ€บ javascript
JavaScript Modulo Operator Guide With Examples
June 3, 2023 - The modulo operator, represented by the percentage symbol (%), is a commonly used operator in JavaScript that returns the remainder of a division operation. In other words, it tells you what's left over after dividing two numbers.
๐ŸŒ
Josh W. Comeau
joshwcomeau.com โ€บ javascript โ€บ modulo-operator
Understanding the JavaScript Modulo Operator โ€ข Josh W. Comeau
To understand why this works, it's worth remembering our new model for division: we're trying to divide timeElapsed into 3 equally-sized groups, without any fractional or decimal values. The remainder will always be either 0, 1, or 2.
๐ŸŒ
LogRocket
blog.logrocket.com โ€บ home โ€บ mastering the modulo operator in javascript: a complete guide
Mastering the modulo operator in JavaScript: A complete guide - LogRocket Blog
June 4, 2024 - For example, when we divide 10 by three, we get a quotient of three and a remainder of one. We can also write this as 1 (mod 3). In JavaScript, the modulo operator gets the remainder of a division operation.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ javascript โ€บ javascript-remainder-operator
JavaScript Remainder(%) Operator
July 23, 2025 - <script> // Initializing variables var a =-4 var n = 2 // Calculating remainder var rem = a%n // Calculating modulo var mod = ((a%n)+n)%n // Printing result console.log(rem) console.log(mod) </script> ... <script> // Both operands are NaN ...
๐ŸŒ
Reddit
reddit.com โ€บ r/programming โ€บ understanding the javascript modulo operator
r/programming on Reddit: Understanding the JavaScript Modulo Operator
December 12, 2023 - The post explains the Modulo operator (%) in JavaScript, which is often misunderstood and appears to produce random values. The author clarifies its function by redefining how we think about division, emphasizing that it's about dividing a number into equally-sized groups without fractional remainders.
๐ŸŒ
Educative
educative.io โ€บ answers โ€บ what-is-the-modulo-operator-in-javascript
What is the modulo operator in JavaScript?
The modulo operator is represented by the % character in JavaScript. It returns the remainder of two integers that have been divided. ... As the remainder will always be less than the divisor, modulo operators can be very useful in restricting ...