The replaceChildren JS ParentNode replaces all the children of the node with nodes, while replacing the strings in the nodes with equivalent text nodes.
node.replaceChildren(nodes)
Objects that implement Node. Nodes participate in a tree, which is known as the node tree.