Underscore.js _.mod() Function
The _.mod() function 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