function executeFunction(func) {
func();
}
var mathOperations = function(x, y) {
var multiply = x * y;
var add = x + y;
var subtract = x - y;
console.log("Addition: " + add);
console.log("Subtraction: " + subtract);
console.log("Multiplication: " + multiply);
}
executeFunction(mathOperations.bind(null, 9, 3));
What is the correct way to pass parameters into a function expression? Why does the line
executeFunction(mathOperations.bind(null, 9, 3));
not work?