I have javascript code like below to get the size of an array,
var testvar = [ ];
testvar[1] = 2;
testvar[200] = 3;
alert(testvar.length); //201
But the code alerts 201
insted of getting the size 2
,Why?
I need to get the count of total elements in that array.