For in loop


#1

what is this for( ...in..) loop
what it does


#2

it loops over all the properties of an object.


#3

you mean it is only used for objects


#4

well, you could use it for arrays, but its ill advised (as you can read in the docs i posted)

well, given objects are also associative arrays in JS you should be able to use the for in loop for associative arrays


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.