Can someone explain what's going on here, and how to fix it? I'm using JSMock, and executing the following code in spec.js
:
for (var t in []) {
alert(t)
}
... causes my browser to alert "eachIndexForJsMock" (when it shouldn't execute the alert
command at all). This is messing up my for each
loops. How do I fix it?