<ul>
<li class="list">list1</li>
<li class="list">list2</li>
<li class="list">list3</li>
<li class="list">list4</li>
<li class="list">list5</li>
</ul>
const items = document.querySelectorAll('li')
const itemsClass = document.querySelectorAll('.list')
console.log(items) // [object NodeList] (5)
console.log(itemsClass) // [object NodeList] (5)
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.