javascript after

Solutions on MaxInterview for javascript after by the best coders in the world

showing results for - "javascript after"
Máximo
12 Jun 2016
1var parent = document.createElement("div");
2var child = document.createElement("p"); 
3parent.appendChild(child);
4
5child.after("Text"); 
6
7console.log(parent.outerHTML);
8// "<div><p></p>Text</div>"