<script> const elements = document.getElementsByClassName("test");
const appendTo = document.getElementById("element-testing");
for (let i = 0; i < elements.length; i++) {
appendTo.insertAdjacentElement('beforeend', elements[i]);
}
</script>