How do you switch one image to another using JavaScript?
I have been looking into different ways to use JS to switch from one image to another. I tried using classList.toggle and now eventListener method, which I thought will work just fine but the button is not working in all scenarios. I also want to change the text of the button using .textContent. I realized that some of my syntax is light blue. Wondering what I am missing. I checked the console several times but no issues found.