'; DivContainer[i].appendChild(newDiv); } for (i = 0; i < DivContainer.length; i++) { AddNewHome(); } } if (DavContainer.length !== 0) { function insertAfter(referenceNode, newNode) { referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling); } const newDav = document.createElement("div"); newDav.setAttribute("class", "rvw_stars"); newDav.innerHTML = ''; insertAfter(DavContainer[0], newDav); }