<body>
<h1 class="titulo">Esto es un <b style="visibility: none;">titulo</b> </h1>
<div style="background-color: aliceblue; height: 200px;" class="container"></div>
<div style="background-color: #ccc; height: 200px;" class="container1"></div>
<script>
/************** Create Elements ****************/
const container = document.querySelector(".container");
const container1 = document.querySelector(".container1");
const item = document.createElement("LI");
item.textContent = "this text go inside";
container.appendChild(item);
container1.appendChild(item);
console.log(item);
</script>
When appended the variable item to one element, It is not possible to append it again to another element.
As I show in the code, I append the "item" variable to the "container" and then append the same "item" variable to the "container1" and it dissapeared from the "container".
How can I do to maintain the value in the variable to append it to many elements?
Thanks