I’d like to have an array in javascript that each item contains 2 properties instead of 1, how would that be possible?
The following only adds one property to the item by default:
var headerCellWidths = new Array();
headerCellWidths.push(100);
this enables me access the item using [0][normalCellWidth]
but I’d like to be able to have e.g. [index][normalCellWidth][firstTemplateCellWidth]
e.g. [0][100][25]
e.g. headerCellWidths.add(100, 25);
One solution is to create my own CustomArray obviously which maintains 2 separate array instances but isn’t there a better way?
Thanks,
You can add the entries as objects to the array.
Try this:
You would access the items using:
headerCellWidths[0].normalCellWidthandheaderCellWidths[0].firstTemplateCellWidth