A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/javascript/operators/modulus below:

modulus ยท WebPlatform Docs

modulus Summary

Divides the value of one expression by the value of another, and returns the remainder.

Syntax
result = number1 % number2
result
Any variable.
number1
Any numeric expression.
number2
Any numeric expression.
Examples

The following code shows how to use the modulus operator.

var modResult = 19 % 6.7;
document.write(modResult);

Remarks

The modulus, or remainder, operator divides number1 by number2 and returns only the remainder as result. The sign of result is the same as the sign of number1. The value of result is between 0 and the absolute value of number2.

Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4