I have this code in a function:
tableFields = tableFields.children; for (item in tableFields) { // Do stuff }
According to a console.lo
In the year 2020 / 2021 it is even easier with Array.from to 'convert' from a array-like nodes to an actual array, and then using .map to loop through the resulting array. The code is as simple as the follows:
Array.from
.map
Array.from(tableFields.children).map((child)=>console.log(child))