1var list = document.querySelector('#list')
2var fruits = ['Apple', 'Orange', 'Banana', 'Melon']
3
4var fragment = new DocumentFragment()
5
6fruits.forEach(function (fruit) {
7 var li = document.createElement('li')
8 li.innerHTML = fruit
9 fragment.appendChild(li)
10})
11
12list.appendChild(fragment)
13