클릭하면 글자 색 바뀌게 하기 const h1 = document.querySelector(".hello:first-child h1"); function handleTitleClick(){ if(h1.style.color === "blue"){ h1.style.color = "tomato"; } else { h1.style.color = "blue"; } } h1.addEventListener("click", handleTitleClick); 더 보기 좋게 바꿔보자. 👇 const h1 = document.querySelector(".hello:first-child h1"); function handleTitleClick(){ const currentColor = h1.style.color; let ne..