Believe it or not, this was my first time building a slider. Whenever I'm going to build something for the first time, I always try to conquer the challenge by myself. I highly suggest you do the same, before jumping into YouTube or Google to find solutions. First, try to come up with a solution that just works, and doesn't matter how messy your JS looks at the moment. Next, try to refactor that messy code, so that when you need to work on that project again you can figure out what is what just in a glance. Lastly, if along the way you've come across a problem that you cannot solve by yourself, then try using Google or YouTube to figure out what you did wrong. And trust me, this simple process will help you a lot. If you're someone who's trying to come out of tutorial hell, then you should definitely stick to this routine. Otherwise, you'll always be watching others' videos on YouTube and copy and paste their code from CodePen or GitHub repo.
You already know what to do, if you have any suggestions π¨π»βπ» Cheers πΎ