Complete the code to select the carousel element by its ID.
const carouselElement = document.querySelector('[1]');
Use #myCarousel to select the element with ID myCarousel.
Complete the code to create a Bootstrap Carousel instance from the element.
const carousel = new bootstrap.Carousel([1]);Pass the selected DOM element carouselElement to the Carousel constructor.
Fix the error in the code to move the carousel to the next slide programmatically.
carousel.[1]();The correct method to move to the next slide is next().
Fill both blanks to pause and then cycle the carousel programmatically.
carousel.[1](); carousel.[2]();
Use pause() to stop the carousel and cycle() to start it again.
Fill all three blanks to move the carousel to a specific slide index programmatically.
carousel.[1]([2]); // Example: move to slide number [3]
The method to(index) moves the carousel to the slide at the given zero-based index. Here, index 2 means the third slide.
