For-in the JScript is unique to other languages, in a way that it iterates over the keys, where as in most other languages ( C#, Python.. ), it iterates over the values.
var location = { x : 100, y : 200 }for (var i in location) { print(i); }
would give the following outputxy
Now, suppose the location was not a Jscript object, but a .NET object. ( from C#). This gives a interesting issue. What should be printed in the above case? Should it be 100, 200 or x, y ? In the Managed Jscript, it iterates over the keys, because that’s what a Jscript programmer would expect, irrespective of, from where the object came from.