append to end dom code example
Example 1: .append js
let parent = document.createElement("div")
parent.append("Some text")
console.log(parent.textContent) // "Some text"
Example 2: appendchild on specific position
parentElement.insertBefore(newElement, parentElement.children[2]);