Use .forEach
programming.karlcoelho.com
programming.karlcoelho.com
All that being said, there are definitely ways to gain the same functionality using a utility library like Underscore (or the much-faster-than-underscore Lodash). Instead of `array.forEach` it's simply `_.forEach(array, function(item) { });` - http://lodash.com/docs#forEach
for (var i in cars) { console.log(cars[i]) }
Also, if you're using JS on the frontend, forEach isn't supported by all browsers: http://stackoverflow.com/questions/156696/which-web-browsers...