Can Anyone help me write this in java script

Exercise One: In this exercise you will be creating two functions.

// Function One: Will be called 'multiply'.
// This function will take two parameters, both numbers
// This function will return the two numbers multiplied together.

// Function Two: Will be called 'calculator'.
// This function will take three parameters,
// First will be a callback function,
// Second and Third will be numbers.
// This function will return the two numbers passed into the callback function.

// NOTE: You can use the multiply function to test the calculator function, but understand that
// other callback functions will be passed into it as a test.

You are viewing a single comment. View All
Answered by mwilki7 (287) [earned 5 cycles]
faziz6006 (2)

@mwilki7 yes maybe im not writing it in the right space: here is the full question , where should i write my answer? and what does the last sentence ask me to do ?

// Exercise One: In this exercise you will be creating two functions.

// Function One: Will be called 'multiply'.
// This function will take two parameters, both numbers
// This function will return the two numbers multiplied together.

// Function Two: Will be called 'calculator'.
// This function will take three parameters,
// First will be a callback function,
// Second and Third will be numbers.
// This function will return the two numbers passed into the callback function.

// NOTE: You can use the multiply function to test the calculator function, but understand that
// other callback functions will be passed into it as a test.

function calculator (callback, p1, p2)
{
callback (p1, p2);
return callback(p1, p2);
}

//Call MULTIPLY to multiply the two numbers
var product=MULTIPLY(number1, number2);