Which of the following is the output of this function? And please explain the process in getting the answer. Thank you


#1

var num = 15 % 2 + 6 * 4;
var step = num % 2;
var calc = function(step1, step2) {
var ran = (step + step1) * step2;
return ran;
};

calc(2, 3);


#2

This may as well be a constant, 25.

Again, may as well be a constant, 1.

Since step is 1, ran is (step1+1) * step2. In the case of 2 and 3 that will return 9.


#3

Ahh. i see. Thank you!