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;
}

Post a Comment