clickedBtn(e) {  
        let newIndex;

        if (e.target.closest("button").getAttribute(this.BTN) === 'prev') {
            newIndex = this.prevIndex(this.getCurrentIndex(this.SLIDER))
        } else if (e.target.closest("button").getAttribute(this.BTN) === 'next') {
            newIndex = this.nextIndex(this.getCurrentIndex(this.SLIDER))
        }

        this.updateSlider(newIndex);
    }
/**
     * Handles click on either next och previous button
     * @param {Object} e The click event
     */
Handles click on either next och previous button
@param {Object} e The click event
Handles click on either next och previous button @param { Object } e The click event
clickedBtn(e) {  
        let newIndex;
        if (e.target.closest("button").getAttribute(this.BTN) === 'prev') {
            newIndex = this.prevIndex(this.getCurrentIndex(this.SLIDER))
        } else if (e.target.closest("button").getAttribute(this.BTN) === 'next') {
            newIndex = this.nextIndex(this.getCurrentIndex(this.SLIDER))
        }
        this.updateSlider(newIndex);
    }
clickedBtn ( e ) { let newIndex ; if ( e . target . closest ( "button" ) . getAttribute ( this . BTN ) === 'prev' ) { newIndex = this . prevIndex ( this . getCurrentIndex ( this . SLIDER ) ) } else if ( e . target . closest ( "button" ) . getAttribute ( this . BTN ) === 'next' ) { newIndex = this . nextIndex ( this . getCurrentIndex ( this . SLIDER ) ) } this . updateSlider ( newIndex ) ; }
Handles click on either next och previous button
 @param {Object} e The click event
Handles click on either next och previous button @param { Object } e The click event