I have a new function that includes an array as one of its parameters. I created an array for testing using the following:
var numArray = new Array(1,8,1,2,3,4,4,9,4,4,5,5,5,6,6,8,4,9);
var newTemp = pk(numArray);
.
.
.
function pk(xArray) {
.
}
The function works fine and returns the correct answer in test. Now, in my regular program, I have created an array using:
if ( bInit == false ) {
H1 = efsInternal("Calc_HV", xStdDev, nAnnual, nPer);
H1 = getSeries(H1);
bInit = true;
}
.
.
.
var newTemp = pk(H1);
Within my function, I can print out individual array elements as H1.getValue(...) and they are correct. The following statement in my function, which worked in test, now returns "undefined."
var aCount = xArray.length;
I did not make any changes to my function between testing and implementation, and all arrays have been defined globally. Since the H1 array was defined during initialization, do I need to pass that differently? I'm afraid that I'm not sure why this isn't working. Thanks for any help.
var numArray = new Array(1,8,1,2,3,4,4,9,4,4,5,5,5,6,6,8,4,9);
var newTemp = pk(numArray);
.
.
.
function pk(xArray) {
.
}
The function works fine and returns the correct answer in test. Now, in my regular program, I have created an array using:
if ( bInit == false ) {
H1 = efsInternal("Calc_HV", xStdDev, nAnnual, nPer);
H1 = getSeries(H1);
bInit = true;
}
.
.
.
var newTemp = pk(H1);
Within my function, I can print out individual array elements as H1.getValue(...) and they are correct. The following statement in my function, which worked in test, now returns "undefined."
var aCount = xArray.length;
I did not make any changes to my function between testing and implementation, and all arrays have been defined globally. Since the H1 array was defined during initialization, do I need to pass that differently? I'm afraid that I'm not sure why this isn't working. Thanks for any help.
Comment