Underscore.js | _.mod() Method
The _.mod() Method returns the remainder of dividing the given dividend by the given divisor.
_.mod( dividend, divisor );
- dividend: given dividend from which mod is calculated.
- divisor: given divisor which is used to calculate the modulus.
Return Value: This method returns the calculated modulus from the given arguments.
underscore.js contrib library can be installed using npm install underscore-contrib –save.
The Modulus is : 4
The Modulus is : 20
The Modulus is : 0