So, I was disappointed to learn that JavaScript is for ( var in array/object)not equivalent to pythons for var in list:.
In JavaScript, you repeat the indices themselves, for example.
0,
1,
2,
...
where, as in the case of Python, you repeat the values ββpointed to by indexes, for example.
"string var at index 0",
46,
"string var at index 2",
["array","of","values"],
...
Is there a standard JavaScript equivalent for the Python loop mechanism?
Denial of responsibility:
I know that the for (var in object) construct is for use in iterating over keys in a dictionary and usually not over array indices. I am asking a specific question regarding the use of cases in which I don't care about order (or very much about speed) and just don't want to use a while loop.