export function divideBy2(num) {return [num >> 1, num & 1];}
export function divideBy4(num) {return [num >> 2, num & 3];}
export function divideBy8(num) {return [num >> 3, num & 7];}
function intDivide(numerator, denominator) {return parseInt((numerator/denominator).toString().split(".")[0]);}
let x = intDivide(4,5);let y = intDivide(5,5);let z = intDivide(6,5);console.log(x);console.log(y);console.log(z);
function integerDivison(dividend, divisor){
this.Division = dividend/divisor;this.Quotient = Math.floor(dividend/divisor);this.Remainder = dividend%divisor;this.calculate = ()=>{return {Value:this.Division,Quotient:this.Quotient,Remainder:this.Remainder};}
}
var divide = new integerDivison(5,2);console.log(divide.Quotient) //to get Quotient of two valueconsole.log(divide.division) //to get Floating division of two valueconsole.log(divide.Remainder) //to get Remainder of two valueconsole.log(divide.calculate()) //to get object containing all the values