sj137
3 Aug 2007, 5:41 AM
this may not be an ext issue, jus wondering if anyone else has encountered it...
i have an array like:
var myarray = [];
myarray.push('hello');
myarray.push('world');
myarray.length reads 2, however when i iterate through the array i get 3 values!
eg
var counter=0;
for (x in myarray){
console.log(myarray[x]);
counter++;
}
console.log(counter);
the result in firebug is as follows:
hello
world
function()
3
..!!! what is going on?
/:)
i have an array like:
var myarray = [];
myarray.push('hello');
myarray.push('world');
myarray.length reads 2, however when i iterate through the array i get 3 values!
eg
var counter=0;
for (x in myarray){
console.log(myarray[x]);
counter++;
}
console.log(counter);
the result in firebug is as follows:
hello
world
function()
3
..!!! what is going on?
/:)