elemento foreach na classe JavaScript

var slides = getElementsByClassName("slide");
for(var i = 0; i < slides.length; i++)
{
   Distribute(slides[i]);
}
Thankful Tuatara