function divide(num, den, rem) { //Numerator, Denomenator, Remainder
rem = Math.abs(num) % Math.abs(den)
return rem
}
console.log(divide(13, 5)) // logs '3'
Math.abs() is a function to make the integer a positive integer so that negative integers cant be divided
'rem' gets the remainder