JSFiddle - React, Tailwind, and code Playground

HTML

<ul>
  <li>some val</li>
  <li>some other val</li>
</ul>

JavaScript

Array.apply(null, document.querySelectorAll('li')).forEach(function(item) {
    console.log(item)
  });