Fucntions w/ 2 parameters Lesson4/7 modulo example


#1

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.


#2

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


#3

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