I am playing around with DOM commands to get a better understanding of them. However, I am getting an error message when I try to append a string of HTML to a child of an element I've selected. I get an error message that says my div3 variable is not a node. However, when I console.log(div3) it is listed as a node in my console log. What am I doing wrong?
var div3 = document.getElementById('div3');
div3.innerHTML = "Test String";
console.log(div3);
div3.appendChild("<h2>myH2 tag</h2>")
<div id="div3"><p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Consequatur, natus.</p></div>
appendChild()