Tuesday, September 20, 2005

For The Hell Of It

ForStatementĪ‰

Wonderful, I can use a foreach() type construct. But, how do I get to the Nth statement? Luckily, snippets can help.



function __item(data, n) {
var i = 0;
for (key in data) {
if (i == n) {
return data[key];
}
i++;
}

return false;
}

No comments: