There is a special operator %
that can be used to compute the remainder
of dividing one number by another:
alert(10 % 3); // shows 1
If one number is evenly divisible by the second, the remainder will be zero:
alert(10 % 2); // shows 0
Of course, the operator %
can be
applied not only to numbers, but also to variables:
let a = 10;
let b = 3;
alert(a % b); // shows 1
Find the remainder after dividing the following variables:
let a = 13;
let b = 5;