divmod
Returns an array consisting of the quotient and remainder of the given numbers.
- Use Math.floor()to get the quotient of the divisionx / y.
- Use the modulo operator (%) to get the remainder of the divisionx / y.
Returns an array consisting of the quotient and remainder of the given numbers.
Math.floor() to get the quotient of the division x / y.%) to get the remainder of the division x / y.