I'm trying to replicate html elements with a javascript for loop, the loop runs fine but does not create new elements in html.
When i print father in console, Continued with 1 element only.
var child = document.getElementById('child');
var father = document.getElementById('father');
for (let i = 0; i < 4; i++) {
father.appendChild(child)
}
<div id="father">
<div id="child" class="row mt-5">
<div class="col-sm-8">
<h2 class="news" id="">News</h2>
</div>
</div>
</div>
I want print div child 5 times in the browser