Oops, try again. Your function multiply failed on inputs 0,0 where you returned NaN instead of 0


#1

I'm stuck at JS course, Introduction to Objects I, 13.Function Review.

The error is: "Oops, try again. Your function multiply failed on inputs 0,0 where you returned NaN instead of 0".
here is my code:

// Accepts a number x as input and returns its square
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; };

thanks


#2

HI this line

return x / y;

intead of / (which is for the division) you shhould use *

*


#3

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