Thanks for making it more confusing! ;)
The reason I used array.get(iStr) instead of array.getSlot(I) just happened
to be because of my previous post about array.getSlot() returning the
undefined object. I should however have used getSlot in this example to
make it more clear that I knew I was
I think this is not a bug. "length" is not the same as number of
properties in an object. For example, if you try this:
var a = [3, 5, 66];
a.foo = "nar";
for (var i = 0; i < a.length; i++)
print(a[i]);
"length" is 3 [and not 4]. keySet size is the number of "keys"
(properties). You've to
@Sundararajan
When looping an array in javascript I would typically do something like
this...
for(var i = 0; i < arr.length; i++) {
console.log('Index: ' + i + ' = ' + arr[i]);
}
When looping a javascript array using the ScriptObjectMirror I would
initially think to use the same