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 OverflowW3Schools
w3schools.com โบ js โบ js_arithmetic.asp
JavaScript Arithmetic
The modulus operator (%) returns the division remainder. let x = 5; let y = 2; let z = x % y; Try it Yourself ยป ยท In arithmetic, the division of two integers produces a quotient and a remainder.
Videos
04:45
Javascript Modulo Operator Explained | Understanding modulo rest ...
04:40
Use Cases for Remainders in Programming (with JavaScript) - YouTube
03:16
What is MODULO? | JavaScript in LESS-THAN 3 | JavaScript Beginner ...
04:45
Modulo Operation in JavaScript - Coderbyte - YouTube
02:23
You'll Use This More Than You Think... JavaScript Modulo Operator ...
01:00
Master the Modulo Operator in JavaScript with Real-World Examples ...
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....
Mimo
mimo.org โบ glossary โบ javascript โบ modulo-operator
JavaScript Modulo Operator: Syntax, Usage, and Examples
Learn how JavaScript's modulo operator works with positive and negative numbers, floating points, and loops. Includes syntax, tips, and real examples.
Mastering JS
masteringjs.io โบ tutorials โบ fundamentals โบ modulus
The Modulus Operator in JavaScript - Mastering JS
The modulus operator in JavaScript returns the remainder when the first operand is divided by the second operand. Here's what you need to know.
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.
W3Schools
w3schools.com โบ js โบ tryit.asp
W3Schools online HTML editor
The W3Schools online code editor allows you to edit code and view the result in your browser
TutorialsPoint
tutorialspoint.com โบ What-is-Modulus-Operator-in-JavaScript
What is Modulus Operator (%) in JavaScript?
In the expression a % b, a is called dividend, while b is known as divisor. In case of the modulo, the expression ((a % b) + b) % b is used to find out the remainder, where the sign of the resultant remainder will be similar to the sign of the divisor, b in this case.
Delft Stack
delftstack.com โบ home โบ howto โบ javascript โบ javascript modulo
Modulo Operator(%) in JavaScript | Delft Stack
March 11, 2025 - Learn how to use the modulo operator (%) in JavaScript with this comprehensive tutorial. Explore its applications, check for even or odd numbers, and discover practical examples to enhance your coding skills. Ideal for beginners and experienced developers looking to master this essential operator.
W3Schools
w3schools.com โบ js โบ tryit.asp
W3Schools Tryit Editor - JavaScript Arithmetic
The W3Schools online code editor allows you to edit code and view the result in your browser