Using for-each since older browsers don't have Array#forEach.