append befor code example Example: appendBefore let insertedNode = parentNode.insertBefore(newNode, referenceNode)