const players = [...document.querySelectorAll('section.player')]; for (const [index, item] of players.entries()) { console.log(i, v); } // 0 <section class="player player--0 player--active">…</section> // 1 <section class="player player--1">…</section>
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter