Say I have this:
var foo = function(x, y) {
return x + y;
};
var bar = function(fname, param1, param2) {
/*
* how do I call the function "foo"
* and pass parameters to it?
*/
window[fname];
};
var tot = bar(foo, 1, 2);
I'm unsure about how to call "foo" from within "bar" and have parameters
passed to "foo".
Andrew Poulos
var foo = function(x, y) {
return x + y;
};
var bar = function(fname, param1, param2) {
/*
* how do I call the function "foo"
* and pass parameters to it?
*/
window[fname];
};
var tot = bar(foo, 1, 2);
I'm unsure about how to call "foo" from within "bar" and have parameters
passed to "foo".
Andrew Poulos
Comment