Let's say that someone asks a question, and I add this simple answer in code (context: create array of tags in document): <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> function countTag() { let tags = []; for (tag of document.getElementsByTagName("*")) { tags.push(tag.tagName); } return tags; } console.log("Tags: ", countTag()); <!-- language: lang-html --> <div>a</div> <div>b</div> <div>c</div> <div>d</div> <div>e</div> <!-- end snippet --> But later, I do more research and find a more compact, refined way to achieve the same result, but with different compatibility: <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> function countTag(tag="*") { return [...document.getElementsByTagName(tag)].map(a => a.tagName) } console.log(countTag("*")) <!-- language: lang-html --> <div>a</div> <div>b</div> <div>c</div> <div>d</div> <div>e</div> <!-- end snippet --> If I want to add this new, refined code to my answer, what should I do? Should I create a new answer with the new code, add the new code as an "extra" to my original answer in an edit, or edit out the old answer entirely and replace it with the new answer?