Let's suppose we have, for instance:
const array = [1, 0, 1, 1, 0]
In case I do this:
for(const el of array) console.log(array.indexOf(el))
I will always get either 0 or 1 because it will search for the first occurrence that matches the value. How do I refer to the element within an array precisely by its index? That is, how to get "0, 1, 2, 3, 4" in that case? Or even with a more than one dimension array, for example.