<div>
<i id="icons" class="far fa-heart"></i>
</div>
I don't know why this code doesn't changes the icons as script is linked and the console didn't show any error as well
let icons = document.getElementById("icons");
icons.addEventListener("click", () => {
icons.classList.remove = "far fa-heart";
icons.classList.add = "fas fa-heart";
console.log(icons);
});
icons.classList.remove=("far fa-heart");
icons.classList.add=("fas fa-heart");
replace above lines of code with this :
icons.classList.remove("far fa-heart");
icons.classList.add("fas fa-heart");