Simple, safe and ready-to-use foreach implementation in javascript. Safer than for...in.