function alpha(a,b){
}
//////
function init(){
alpha(oneValue, "");
}
function privateFunc(){
alpha("" , twoValue);
}
My two argument function has an initializer with it’s own argument, but at the same time I have a private function that places a variable into the two argument function.
Would I do something like this;
alpha(function init(){}, function privateFunc(){});
But then alpha is a private function with a public init function in it. Pretty sure I know not what do…
I presume init is called early, so it’s not until privateFunc is called that you’ve collected enough information to actually invoke alpha.
function alpha(a,b){
}
var savedOneValue;
function init(){
savedOneValue = oneValue
}
function privateFunc(){
// Only now do we have both pieces of information needed to invoke alpha
alpha(savedOneValue, twoValue)
}