Currently, I am in the process of creating a simple movie site and am working on the home page. On the home page, there is a carousel. In CSS, I have hidden the visibility of all slides, and my plan is to create an array for all the slides in JavaScript and switch between them when the arrow icon is clicked.
As a first step, I want to activate the 1st slide when the web page is loaded. I used the .classList.add() property to activate the 1st element of the array, but it's not working properly.
Please help me figure this out.