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
๐ŸŒ
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.
๐ŸŒ
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....
๐ŸŒ
Josh W. Comeau
joshwcomeau.com โ€บ javascript โ€บ modulo-operator
Understanding the JavaScript Modulo Operator โ€ข Josh W. Comeau
When I was first learning to code, I remember finding the Modulo operator (%) extremely confusing. ๐Ÿ˜ฌ ยท If you don't understand what it's doing, the values it produces seem completely random: ... In this blog post, we're going to learn how this operator works by refining our mental model for division. We'll also cover a practical, every-day use case for this curious fella. ... This blog post is written for beginner-to-intermediate JavaScript developers.
๐ŸŒ
W3Schools
w3schools.com โ€บ jsref โ€บ jsref_oper_remainder.asp
JavaScript Remainder Operator
Addition Subtraction Multiplication Division Exponentiation Remainder Increment Decrement Concatenation Unary Plus Unary Negation JS Comparison
๐ŸŒ
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 - For example, 10 modulo 3 will be ... for JavaScript, you will use 10 % 3. It divides the first operand (the dividend) by the second operand (the divisor) and returns the remainder....
๐ŸŒ
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
๐ŸŒ
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.
Find elsewhere
๐ŸŒ
freeCodeCamp
freecodecamp.org โ€บ news โ€บ javascript-arithmetic-math-operators-explained
JavaScript Modulo, Division, Remainder and Other Math Operators Explained
January 31, 2020 - JavaScript provides the user with five arithmetic operators: +, -, *, / and %. The operators are for addition, subtraction, multiplication, division and remainder (or modulo), respectively. Addition Syntax a + b Usage 2 + 3 // returns 5 true...
๐ŸŒ
Rip Tutorial
riptutorial.com โ€บ remainder / modulus (%)
JavaScript Tutorial => Remainder / Modulus (%)
The remainder / modulus operator (%) returns the remainder after (integer) division ยท This operator returns the remainder left over when one operand is divided by a second operand.
๐ŸŒ
W3Schools
w3schools.com โ€บ jsref โ€บ jsref_oper_division.asp
JavaScript Division Operator
The division (/) operator returns the quotient between two operands. ... If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: sales@w3schools.com ยท If you want to report an error, or if ...
๐ŸŒ
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.
๐ŸŒ
30 Seconds of Code
30secondsofcode.org โ€บ home โ€บ javascript โ€บ math โ€บ quotient and remainder of division
Calculate the quotient and remainder of a division in JavaScript - 30 seconds of code
December 28, 2023 - Its purpose is to return a 2-tuple consisting of the quotient and remainder of a division. For example, divmod(8, 3) returns (2, 2) because 8 / 3 = 2 with a remainder of 2. In order to implement divmod() in JavaScript, we can use the built-in Math.floor() function to get the quotient and the modulo operator (%) to get the remainder of the division x / y...
๐ŸŒ
Codedamn
codedamn.com โ€บ news โ€บ javascript
JavaScript Modulo Operator Guide With Examples
June 3, 2023 - The basic syntax of the modulo operator in JavaScript is as follows: ... Here, remainder is the result of the modulo operation, dividend is the number you want to divide, and divisor is the number you want to divide by.
๐ŸŒ
Mastering JS
masteringjs.io โ€บ tutorials โ€บ fundamentals โ€บ modulus
The Modulus Operator in JavaScript - Mastering JS
For example, -21 % 5 === -1, because the remainder always takes the sign of the left number. However, a true modulus operator would always return a positive value, so 21 modulo 5 would equal 4. In practice, you are unlikely to use the remainder operator on negative values, and many JavaScript developers aren't aware of the difference.
๐ŸŒ
Codecademy
codecademy.com โ€บ forum_questions โ€บ 53027ed09c4e9df1c70006e1
Javascript, Modulo and if/else | Codecademy
My code: //An example of an if/else statement with modulo in the condition ... if() { console.log(โ€œThe first number is even!โ€); } else { console.log(โ€œThe first number is odd!โ€); } Any help? ... โ€“ In order to check if a number is even we divide the number by 2 and if the remainder is zero then the number we just divided is an even number, right? In JavaScript there is a shortcut to a mechanism in its library that does that operation automatically for us.
๐ŸŒ
JavaScript Tutorial
javascripttutorial.net โ€บ home โ€บ javascript tutorial โ€บ javascript remainder operator
JavaScript Remainder Operator
November 15, 2024 - To get a modulo in JavaScript, you use the following expression: ... const mod = (dividend, divisor) => ((dividend % divisor) + divisor) % divisor;Code language: JavaScript (javascript)
๐ŸŒ
Career Karma
careerkarma.com โ€บ blog โ€บ javascript โ€บ javascript modulo: a how-to guide
JavaScript Modulo: A How-To Guide | Career Karma
December 1, 2023 - The JavaScript Math.round() method rounds the value returned by our division sum to the nearest decimal place. This is useful because we cannot buy part of a candy bar. Next, we can use the modulo operator to check if the number of candy bars we can buy is odd or even:
๐ŸŒ
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 ...