slider basic vanilla JS slider class usage let sliderWrap = document.querySelector('.slider-wrap'); let autoplay = true; let newSlider = new Slider(sliderWrap, autoplay);