Good day. 🎩 In JavaScript, when we want to empty or replace the content of a container element, we usually do this: // 1. Empty the container. container.innerHTML = ""; // 2. Replace the content. container.innerHTML = "the replacement"; Now, we have replaceChildren() — documentation on MDN . It was added mid-2020, part of the DOM Living Standard, first implemented in browsers between mid and late 2020 (around the ECMAScript 2020 timeframe, though technically not an ES feature). ES = ECMAScript, not Espagnol. Usage // 1. Empty the container. container.replaceChildren(); // 2. Replace with a single node. container.replaceChildren(newNode); // 3. Replace with multiple nodes. container.replaceChildren(newNode, otherNewNode); // 4. You can even pass strings — they'll be converted to text nodes. container.replaceChildren("Humphry Davy approves this example!"); newNode and otherNewNode are variables. For instance: const newNode = docum...