Joined December 2011
·

Giorgio

Lecco
·
·

I like this way if I'm sure that my array doesn't have falsy values.

var a = [1, 2, 3, 4];

for (var i=0, item; item = a[i]; i++) {
console.log('index', i, 'item', item);
}

Achievements
101 Karma
0 Total ProTip Views