Skip to content

Tag: nodelist

Array.from() not converting nodeList into an array

I’ve created a nodeList of list elements using createElement(). Then I’ve used Array.from() to convert the nodeList in question into array I can iterate over. I want to apply a different width according to the value of the index. If index is even width of 300px else width of 500px. However, the co…