Convert HTML collection into an array

To convert HTML collection into an array with JavaSctipt, use from() function of the Array class:

let lis = document.getElementsByTagName('li')
lis.Array.from(lis);

// Now it is an array
lis.forEach(function(li){
  console.log(li)
})