const title= document.querySelector("#title")
function handleresize(){
console.log("i have been resized")
window.addeventlistner("resize", handlersize);
// handleresize()하면 바로 호출하는것이고, ()를 빼면 특정 조건 만족하면 함수 호출한다는 의미
function handleclick(){
title.style.color="red";
}
title.addeventlistner("click", handleclick);
js는 이벤트에 반응하기 위해 만들어짐 (intercept)