I've just go into developing apps through Titanium's Appcelerator and therefore this is my first experience with Javascript as well. Running into a confusing thing with regards to referencing array values and I was just hoping someone would be able to tell me what is going on.
Basically it boils down to while trying to iterate through a tableView, the following returns the correct values
tableView.data[i].rows[++j]
However this always return undefined
tableView.data[i].rows[j+1]
Can someone explain this to me?
EDIT: Here is the loop I'm talking about
for (i in tableView.data)
for (j in tableView.data[i].rows)
if ("undefined" !== typeof tableView.data[i].rows[j].children[1] && "undefined" !== typeof tableView.data[i].rows[j+1]) {
console.debug("i: " + i + " j: " + j)
} else
console.debug("undefined")