delBtn.addEventListener("click", () => {
    tobuys = tobuys.filter((tobuy) => tobuy.id !== <u>**parseInt**</u>(list.id));
    ul.removeChild(list);
    count.textContent = tobuys.length;
    save();
  });

클릭한 그 버튼의 list id와 같지 않은 id를 가진 목록들이 다시 반환된다.

📌

tobuy.id 의 type은 number

list.id 의 type은 string이라 비교 대상이 될 수 없다.

따라서 parseInt를 붙여서 number type으로 변환해주어야 비교가 가능하다.