I have trouble comprehending, why this code has no errors, aren't we changing reference value by using the replaceWith() method?
const btn = document.getElementById("btn"); btn.replaceWith(btn.cloneNode(true));