divide-remainder
v1.0.0
Published
Divide a number and get a quotient and remainder.
Downloads
15
Maintainers
Readme
divide-remainder
Divide a number and get a quotient and remainder.
Install
npm install divide-remainder
Usage
const divideRemainder = require("divide-remainder");
const { quotient, remainder } = divideRemainder(5, 2);
console.log(quotient);
//=> 2
console.log(remainder);
//=> 1
API
divideRemainder(number, divisor)
number
Type: number
The number to divide.
divisor
Type: number
The number to divide by.