13. Funtcion Review


#1


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


There was a problem with your syntax.


// 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 function = multiply (x , y)


#2

@appylpye :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused: :confused:


#3

You have ...

var function = multiply (x , y)

It should be ...

var multiply = function(x, y) {

... followed by the rest of the function definition.


#4

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

Make sure to call 'multiply' at least once!


#5

After the function definition, you could call it as follows or with any other two numbers of your choice ...

console.log(multiply(7, 6));

#6