I have been working on setting up an .image-slider__fraction block to display the active slide number out of the total number of slides. However, I am encountering an error in the JavaScript that says "Uncaught ReferenceError: myImageSLider is not defined". I am unsure of the reason behind this issue.
Check out the site here: Find the code on: https://jsfiddle.net/qav8z7f3/
Image reference: https://i.sstatic.net/dRH3i.jpg
let mySliderAllSlides = document.querySelector('.image-slider__total');
let mySliderCurrentSlide = document.querySelector('.image-slider__current');
mySliderAllSlides.innerHTML = myImageSLider.slides.length;
myImageSLider.on('slideChange', function() {
let currentSlide = ++myImageSLider.realIndex;
mySliderCurrentSlide.innerHTML = currentSlide;
});
<div class="image-slider__fraction">
<div class="image-slider__current">1</div>
<div class="image-slider__sepparator">/</div>
<div class="image-slider__total">1</div>
</div>