js get element append code example
Example 1: javascript appendchild at index
parentElement.insertBefore(newElement, parentElement.children[2]);
Example 2: .append js
let parent = document.createElement("div")
parent.append("Some text")
console.log(parent.textContent) // "Some text"