vendredi 13 mars 2015

Where are num1 and num2 being defined?


Vote count:

0




I am extremely new please bear with me. This exercise is from Khanacademy. I got the correct answer and it's moving me along in the lesson but I'm still a bit perplexed.


Where is the variable num1 and num2 getting their value? Is it even being defined?



var add = function(num1, num2) {
return num1 + num2;
};
var subtract = function(num1, num2) {
return num1 - num2;
};
var multiply = function(num1, num2) {
return num1 * num2;
};
var divide = function(num1, num2) {
return num1 / num2;
};

fill(255, 0, 0);
text("2 + 2 is " + add(2, 2), 10, 20);
text("2 - 2 is " + subtract(2, 2), 10, 50);
text("2 * 2 is " + multiply(2, 2), 10, 80);
text("2 / 2 is " + divide(2, 2), 10, 110);


asked 56 secs ago







Where are num1 and num2 being defined?

Aucun commentaire:

Enregistrer un commentaire