Fucntions w/ 2 parameters Lesson4/7 modulo example


Their example:
“When the getRemainder runs, the function knows what numberOne and numberTwo equal since we passed in two parameters when we called the function. Therefore it evaluates 365 % 27, which produces the result 14.
By adding multiple parameters, we can build functions that are more flexible. Now the function has two variables that we can define when we call the function.”

365 / 27 = 13.519

Isn’t the modulo or remainder the .519 part, not the main 14 part? Why is their result 14? I am confused.


you use the division operator, not the modulo operator. Then you get different output.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.