Optimise 'for loops' with cached length

http://jsperf.com/angularjs-foreach-vs-native-foreach/17

A little optimisation can improve the forEach method within AngularJS - although its better to use native JS and simplify your data which you want to iterate over:

var i = 0,arrLen = arr.length;
for (; i < arrLen; i++) {
  arr[i];
}

695,501
±0.15%
fastest