Explanation for 13


#1


https://www.codecademy.com/en/courses/spencer-sandbox/2/1?curriculum_id=506324b3a7dffd00020bf661#


So basically I had gotten this right , but how would I actually multiply it together ,because all it said was null


var square = function (x) {
  return x * x;
};

// Write the function multiply below
// It should take two parameters and return the product


var multiply = function(x,y) {
return x * y
};
multiply(2)


#2

Since you are only passing one argument (two are expected) y is undefined.

 2 * undefined    // NaN

multiply(6, 7)    // 42

#3

Thanj you I wanted to understand how come it had said isNAN


#4

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