1var slides = getElementsByClassName("slide");
2for(var i = 0; i < slides.length; i++)
3{
4 Distribute(slides[i]);
5}
1var slides = document.getElementsByClassName("slide");
2for (var i = 0; i < slides.length; i++) {
3 Distribute(slides.item(i));
4}
1const elements = document.querySelectorAll('.testimonial');
2Array.from(elements).forEach((element, index) => {
3 // conditional logic here.. access element
4});
5
6// -------------------------------------- OR
7
8var testimonials = document.querySelectorAll('.testimonial');
9Array.prototype.forEach.call(testimonials, function(element, index) {
10 // conditional logic here.. access element
11});