jlizarraga
11-26-2008, 09:15 PM
oValue = "test1,test2,test3";
oValue = oValue.split(",");
alert(oValue.length); // Alerts "3"
Shouldn't this alert "2" and not "3", since arrays start at 0? When I use a for loop to iterate through this example, the loop only executes 3 times, not 4.
What am I missing here? :confused:
oValue = oValue.split(",");
alert(oValue.length); // Alerts "3"
Shouldn't this alert "2" and not "3", since arrays start at 0? When I use a for loop to iterate through this example, the loop only executes 3 times, not 4.
What am I missing here? :confused: