JS Iterator Pattern - Image Slider