javascript prepend child 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: prepen an element js
// prepend span to a div
document.createElement("div").prepend(span);
Example 3: javascript add element above
$( "<p>Test</p>" ).insertBefore( ".inner" );