How to remove only the last cloned node?
document.getElementById("add").onclick = function clonar() {
var linha = document.getElementById("linha");
var clone = linha.cloneNode(true);
document.getElementById("saida").appendChild(clone);
}
button {width:50px}
.quadrado {
background:black;
height:50px;
width:50px;
margin-bottom:3px;
}
<div id="linha"><div class="quadrado"></div></div>
<div id="saida"></div>
<button id="add">ADD</button><br>
<button id="del">DEL</button>