The page contains this HTML:
<div id="post"><button id="like">Like</button></div>The code below runs without an error, but its result is wrong. Which statement correctly identifies the bug?
let likes = 0;
document.getElementById("like").addEventListener("click", () => likes++);
document.getElementById("post").innerHTML += "<p>Posted 2 min ago</p>";
document.getElementById("like").click();
document.getElementById("like").click();
console.log("likes:", likes);
insertAdjacentHTML adds the paragraph without touching the existing button, so likes becomes 2.