How can I get the highest key in an array like that:
foo[0] == undefined
foo[1] == "bar"
foo[2] == undefined
foo[3] == undefined
foo[4] == "bar"
foo.length returns me 2, so if i iterate foo.length times, I'll never get the last value.
Or is there a way to count an array considering the undefined values as well?
delete? Instead ofsplice()