Discussion is about the working of code

Discussion is about the working of code
0

#1

When i type this simple code using function to do multiplication , my code does not show any result
The code is

<script>
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(6,7)



</script>

#2

I formatted your code for you, see here for details:

In this case, your function appears fine - but it isn’t showing anything because you don’t specify how the returned value should be shown. You could either write it to your HTML page, or log it to the console, but those are both things you have to code specifically - return alone doesn’t do that automatically.


#3

Thank you Mr. Jackson.
It was a trouble for me for few days .