It does exactly what I think it does, which is either iterate over the properties if it's an object or the elements if it's an array. This is true for Vue and Javascript. I suggest you read the documentation I linked earlier.
Also Vue's directives are not JS. It's a separate DSL. I've repeated this enough so I'll end this discussion here.
In Javascript, `for..in` prints the keys. In an object, the keys are the properties. In an array, the keys are the indexes. If you want the values then use the key to lookup the value from the object or array.
Either way it's entirely consistent: an iterator that works on both objects and arrays and prints the keys without guaranteeing order. Does that clear up the confusion?
Also Vue's directives are not JS. It's a separate DSL. I've repeated this enough so I'll end this discussion here.