When a button is clicked, I want to add an element to my DOM. But first, I want to remove the previous one I added (in the previos click).
Inside the click handler I wrote:
var myP = document.createElement("p");
myP.innerHTML = "asdf";
but it's not working, the "p" does not get added to the DOM.