Convert NodeList to Array for a Stepper to work with IE

  css, html, javascript

I want to create a simple Vanilla JS horizontal stepper without the addition of CSS or JS libraries.
I have found this example but it doesnt work with IE browser.
The problem is the following line:

const  bullets  =  [...document.querySelectorAll('.bullet')];

where he is converting the NodeList of ‘divs’ with class .bullet to Array.
Is there any way to make it work because I have tried "Array.prototype.slice" and copy the Nodelist in a JS array without success..

Source: Ask Javascript Questions

LEAVE A COMMENT