The page contains this HTML:
<ul id="cart"><li data-sku="PEN-01"><span>Pen</span> <button>Remove</button></li></ul>What does the following JavaScript code print when it runs on this page?
const btn = document.querySelector("#cart button");
console.log(btn.closest("li").dataset.sku, btn.closest("#cart").id, btn.closest(".missing"), btn.closest("button") === btn);
closest checks the element itself first, then its ancestors, and returns null when nothing matches.