I want to just change the color of my li tag which is within a ul tag with the class collection.
let btn = document.querySelector(".btn");
let item = document.getElementsByClassName("collection");
btn.addEventListener("click", function() {
item.style.background = "black";
});
I am guessing there is a syntactical error that is tripping me here. What is wrong with this piece of code?