appendchild method js code example
Example 1: mdn appendchild
// Create a new paragraph element, and append it to the end of the document body
let p = document.createElement("p");
document.body.appendChild(p);
Example 2: add a child html object to another html object in js
//Add child at end of object children list
parent.append(child);
//Add child at start of object children list
parent.insertBefore(child, list.childNodes[0]);