I am very new to jscript programming so any help you can provide would be greatly appreciated.
I have created a two dimensional array of 5 rows and 4 columns. The LOOKUP_TAX_POSITION is a function call that retrieves user input data. The column labeled base is not input by the user but needs to be calculated based on the other information input by the user. After loading the table, I am updating the value in the "column" labeled base for rows 1-4 using the previous "rows" data. The base value for row 0 will remain 0.
I am using jscript and have searched a million ways to determine how, or if it is possible to reference the +1 index in a For Loop with no success. Thanks for any guidance you can provide. Here is my code
var RateTableArray = [
{min: ('0'), max: LOOKUP_TAX_POSITION ( 'FDMX1' ), base: ('0'), rate:LOOKUP_TAX_POSITION ( 'RATE1')},
{min: LOOKUP_TAX_POSITION ( 'FDMN2' ), max: LOOKUP_TAX_POSITION ( 'FDMX2' ), base: ('0'), rate:LOOKUP_TAX_POSITION ( 'RATE2' )},
{min: LOOKUP_TAX_POSITION ( 'FDMN3' ), max: LOOKUP_TAX_POSITION ( 'FDMX3' ), base: ('0'), rate:LOOKUP_TAX_POSITION ( 'RATE3' )},
{min: LOOKUP_TAX_POSITION ( 'FDMN4' ), max: LOOKUP_TAX_POSITION ( 'FDMX4' ), base: ('0'), rate:LOOKUP_TAX_POSITION ( 'RATE4' )},
{min: LOOKUP_TAX_POSITION ( 'FDMN5' ), max: ('0'), base: ('0'), rate:LOOKUP_TAX_POSITION ( 'RATE5')},
];
for (i=0; i <= 4 ;i++) {
Base = (RateTableArray[i].max - RateTableArray[i].min) * RateTableArray[i].rate + RateTableArray[i].base ;
RateTableArray[i+1].base = (Base) ; //this is where I am stuck
}