Const int SETSIZE = 30;

Here is where we see why. The array is returned as a SAFEARRAY. The javascript can convert that into something called a VBArray: var vbArray = new VBArray(safeArray); And now, we can convert a VBArray into a native javascript array using the toArray() method: var nativeArray = vbArray.toArray(); ................
................