document.body.appendCHIld multi;le elemtns code example

Example 1: js add multiple element to document

function AppendElements(htmlStringList)
{
  for (let i = 0;i < htmlStringList.length;++i)
  {
    var div = document.createElement('div');
    div.innerHTML = htmlString.trim();

    document.body.appendChild(div);
  }
}

Example 2: appendchild multiple elements

listItem.innerHTML+= listItemCheckbox.outerHTML + listItemLabel.outerHTML + editButton.outerHTML + deleteButton.outerHTML;
listElement.appendChild(listItem);