13.Function Review


#1

I followed it step by step by no pass?
https://www.codecademy.com/en/courses/spencer-sandbox/2/1?curriculum_id=506324b3a7dffd00020bf661#

Make sure you defined a function called multiply

// 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 square = function (x,y) {
  return square;
};

#2

Hello @devninja93146

The name of your second function should be multiply. However you have put it has square. I believe that is the problem...


#3

you called the function square:

var square = function (x,y)

while it should be multiply (it even says in the comments in the lines above)

multiply should return the product of x and y, not sure why it is returning square


#4

A post was split to a new topic: 13. functions review


#5

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