JS code doesn't work after combining two lines of code into a shorter one : This is original code:

h1tag= document.getElementById("myHeading");       
h1tag.addEventListener("mouseover", ()=>{h1tag.style.backgroundColor="blue"});



After combining:

h1tag= document.getElementById("myHeading").addEventListener("mouseover", ()=>{h1tag.style.backgroundColor="blue"});