Ask coding questions

← Back to all posts
Diñho10
Chris2723 (0)

I can't figure this out. What am I doing wrong?

function exerciseTwo(num1, num2){
// In this exercise, you will be given two variables, they will be called: num1 and num2
// On the next line create a variable called 'product' and using math operators return num1 multiplied by num2
var product;
math.product(num1,num2);

// Please write your answer in the line above.
return product;
}

Commentshotnewtop
malvoliothegood (148)

This is what I would do:

// In this exercise, you will be given two variables, they will be called: num1 and num2
// On the next line create a variable called 'product' and using math operators return product
 
function exerciseTwo(num1, num2) {    
var product = num1 * num2;
return product;
}