I need to define the following array as a global array.
var calcReturns = new Array(nPeriods);
for (var i=0;i<nPeriods;i++) {calcReturns[i]=new Array(2)};
But, nPeriods is defined in the FP array in preMain. I'm unsure how to retrieve this value so that I can use it when defining this array outside of main. I tried searching but couldn't come up with anything. Thanks.
var calcReturns = new Array(nPeriods);
for (var i=0;i<nPeriods;i++) {calcReturns[i]=new Array(2)};
But, nPeriods is defined in the FP array in preMain. I'm unsure how to retrieve this value so that I can use it when defining this array outside of main. I tried searching but couldn't come up with anything. Thanks.
Comment