Honestly, I did not understand what array related features exist in Javascript and don't in JScript?
As for me, I'm quite happy using both hashed arrays (properties of objects) and ordinary (indexed) arrays in conjunction.
Following piece of code which creates two "workbooks" and assigns tables (two-dimensional arrays) into it. Workbooks addressed using hashed (named) array.
function arrayDemo()
{
var myWorkbook = {};
var valueCounter = 0;
myWorkbook.Sheet1 = makeTable();
myWorkbook.Sheet2 = makeTable();
// output
for ( var sheet in myWorkbook )
{
for ( var tableLine = 0; tableLine < myWorkbook[ sheet ].length; tableLine++ )
for ( var cell = 0; cell < myWorkbook[ sheet ][ tableLine ].length; cell++ )
Log.Message( "workbook: " + sheet + ", cell[" + tableLine + "][" + cell + "] = " + myWorkbook[ sheet ][ tableLine ][ cell ] );
}
function makeTable() // build two-dimensional array (table)
{
var myTable = [];
for ( var tableLine = 0; tableLine < 3; tableLine++ )
{
var myString = [];
for ( var cell = 0; cell < 10; cell++ )
myString.push( "Value " + ( valueCounter += 2 ) ); // value counter used just for value generation
myTable.push( myString );
}
return myTable;
}
}