showing results for - "js append en t c3 aate"
Alessandro
15 Jun 2018
1var parent = document.createElement("div");
2var p = document.createElement("p");
3var span = document.createElement("span");
4parent.append(p);
5parent.prepend(span);
6
7console.log(parent.childNodes); // NodeList [ <span>, <p> ]
8