append multiple items js 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: javascript add multiple items to array
var a = [];
a.push(1, 2, 3);
console.log(a);