win.forEach(e=>{
if((boxtexts[e[0]].innerText===boxtexts[e[1]].innerText) && (boxtexts[e[1]].innerText===boxtexts[e[2]].innerText) && (boxtexts[e[0]].innerText!=="")){
document.querySelector('.info').innerText=boxtexts[e[0]].innerText+ " Won";
isgameover=true
document.querySelector(".gif").getElementsByClassName("gif")[0].style.width="200px"
}
})
Please let me know what wrong with this??
Check the nesting. Whether it correct or not. I think there`s no such an element as "document.querySelector(".gif").getElementsByClassName("gif")[0]". U can console.log it to be sure it exists.
Furthermore, try not 2 querySelector, but try 2 use querySelectorAll if u have multiple items of this class. And after u get the array u can manipulate it choosing the concrete element in []. Regards.
document.querySelector(".gif").getElementsByClassName("gif")[0] doesn't return any element. Your probably have a typo or something, hard to tell without your HTML code.