Let\'s imagine we should get some data...
var data = [];
//some code omitted that might fill in the data (though might not)
Then we need t
I usually don't check the length before iteration. As a matter of fact, the for loop itself will check the length on each iteration.
There's no performance overhead worth mentioning. In case length was = 0, the only extra instruction would be that a new int i would be declared in the memory. You need thousands of those to feel a millisecond impact.