how to appendChild in the begin of the div javascript

JavaScript
var element = document.getElementById("div1");
element.insertBefore(para, element.firstChild);
Source

Also in JavaScript: